feat: automated releases via github action

- Composite actions for code quality and dependency installations for python and frontend
- Update code quality & pytest workflows
- Add release workflow to handle checks/tests, build and publish to PyPI
- Update `create_installer.sh` to work with the release workflow
- Add docs/RELEASE.md explaining the workflow
This commit is contained in:
psychedelicious
2023-12-23 21:09:23 +11:00
parent fbede84405
commit 6717c98f27
14 changed files with 530 additions and 101 deletions

55
.github/workflows/check-python.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Check Python
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
inputs:
force:
description: 'Force check even if no files were changed'
required: true
default: false
type: boolean
workflow_call:
inputs:
force:
description: 'Force check even if no files were changed'
required: true
default: false
type: boolean
jobs:
check-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check python changes
uses: ./.github/actions/check-python-changes
id: check-python-changes
- name: Determine if checks should run
id: should-run
run: |
echo Files changed: ${{ steps.check-python-changes.outputs.python_any_changed == 'true' }}
echo Force: ${{ inputs.force == true || inputs.force == 'true' }}
echo "bool=${{ steps.check-python-changes.outputs.python_any_changed == 'true' || inputs.force == true || inputs.force == 'true' }}" >> $GITHUB_OUTPUT
- name: Install python dependencies
uses: ./.github/actions/install-python-deps
if: steps.should-run.outputs.bool == 'true'
- name: Install ruff
if: steps.should-run.outputs.bool == 'true'
run: pip install ruff
- name: Ruff check
if: steps.should-run.outputs.bool == 'true'
run: ruff check --output-format=github .
- name: Ruff format
if: steps.should-run.outputs.bool == 'true'
run: ruff format --check .