fix: update anykernel3 config, use venv properly, add ruff linting #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
isPrerelease: | |
description: "Select whether this is pre-release" | |
required: true | |
default: "false" | |
type: choice | |
options: | |
- "true" | |
- "false" | |
permissions: | |
contents: write | |
env: | |
IS_PRERELEASE: ${{ github.event.inputs.isPrerelease || false }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Activate .venv | |
run: | | |
python3 -m pip install -r requirement-uv.txt | |
uv sync --frozen --no-install-project | |
source .venv/bin/activate | |
- name: Build And Assemble | |
run: | | |
export PYTHONPATH=$(pwd) | |
python3 scripts/common/py/run_tests.py | |
python3 scripts/multi_build.py | |
- name: Publish Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifacts | |
path: "multi-build" | |
retention-days: 1 | |
if-no-files-found: "error" | |
- name: Deactivate .venv | |
run: deactivate | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Retrieve artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-artifacts | |
path: "multi-build" | |
- name: Get current version | |
id: version | |
run: echo "version=$(python3 scripts/common/py/get_version.py)" >> $GITHUB_OUTPUT | |
- name: Form a tag name | |
id: tagname | |
run: echo "tagname=v${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
draft: true | |
skipIfReleaseExists: true | |
tag: ${{ steps.tagname.outputs.tagname }} | |
prerelease: ${{ env.IS_PRERELEASE }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "multi-build/*.zip" |