Skip to content

docs(amiga-ball): criterion 22 measured the burst dying, not the filt… #44

docs(amiga-ball): criterion 22 measured the burst dying, not the filt…

docs(amiga-ball): criterion 22 measured the burst dying, not the filt… #44

Workflow file for this run

name: Release
on:
push:
branches: [main]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# pyproject.toml is the single source of truth for the version:
# c64lib.__version__ is read from the installed metadata (derived from
# pyproject), the CHANGELOG heading is test-locked to it, and this
# workflow tags/releases exactly that version. A commit that bumps
# pyproject IS the release; any other push is a no-op.
- name: Read version from pyproject.toml
id: version
run: |
version=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
echo "tag=v$version" >> "$GITHUB_OUTPUT"
if git rev-parse -q --verify "refs/tags/v$version" >/dev/null; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- uses: actions/setup-python@v5
if: steps.version.outputs.exists == 'false'
with:
python-version: "3.12"
- name: Build packages
if: steps.version.outputs.exists == 'false'
run: |
python -m pip install --quiet build
python -m build
- name: Create release
if: steps.version.outputs.exists == 'false'
env:
GH_TOKEN: ${{ github.token }}
run: >
gh release create "${{ steps.version.outputs.tag }}"
--target "$GITHUB_SHA"
--generate-notes
dist/*