Skip to content

Commit

Permalink
Added actions for linting and release
Browse files Browse the repository at this point in the history
  • Loading branch information
howroyd committed Aug 8, 2024
1 parent 339e22c commit e5560c8
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Linting

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
ruff:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}

- name: Dependencies
run: |
sudo apt update
pip install --upgrade pip
pip install ruff
- name: Linting
run: |
ruff check .
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Release Building

on:
release:
types: [published]

permissions:
contents: read

jobs:
build_release:
runs-on: windows-latest
permissions:
contents: write
strategy:
fail-fast: false
matrix:
python_version: ["3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}

- name: Dependencies
run: |
sudo apt update
pip install --upgrade pip
- name: Build the executable
run: |
python build.py
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
file_glob: true
overwrite: true

0 comments on commit e5560c8

Please sign in to comment.