Skip to content

fix(project): inconsistent package name #3

fix(project): inconsistent package name

fix(project): inconsistent package name #3

Workflow file for this run

name: release
on:
push:
tags: ["v*"]
permissions:
contents: write # create the GitHub Release
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # full history + tags for the changelog
- uses: astral-sh/setup-uv@v7
- name: Check tag matches package version
run: |
tag="${GITHUB_REF_NAME#v}"
pkg=$(uv version --short)
if [ "$tag" != "$pkg" ]; then
echo "::error::tag v$tag != project version $pkg — use 'make release VERSION=$tag'"
exit 1
fi
- run: uv build # -> dist/*.whl + *.tar.gz
- name: Generate changelog
uses: orhun/git-cliff-action@v4
id: cliff
with:
args: --latest --strip header
- name: Assemble release notes
run: |
# Annotated-tag message (from `make release DESC=...`) goes above the changelog.
if [ "$(git cat-file -t "$GITHUB_REF_NAME")" = "tag" ]; then
git tag -l --format='%(contents)' "$GITHUB_REF_NAME" > notes.md
printf '\n' >> notes.md
fi
cat "${{ steps.cliff.outputs.changelog }}" >> notes.md
- name: Publish to PyPI
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PUBLISH_TOKEN }}
run: uv publish
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: >
gh release create "$GITHUB_REF_NAME" dist/*
--title "$GITHUB_REF_NAME"
--notes-file notes.md