Skip to content

Release

Release #42

Workflow file for this run

name: Release
# This is a manual workflow for releasing new version of the package.
#
# It will:
# - Build the distribution
# - Publish it to PyPI
# - Create a new release on GitHub
#
# The version (and tag) of the release is determined by the version in the
# `pyproject.toml` file.
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # Required for making the Release
id-token: write # Required for PyPI Trusted Publishing
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "0.5.x"
- name: Build distribution
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(uv run juv version --output-format=json | jq -r '.version')
gh release create v$VERSION
git fetch --tags
awk '/^## / {if (p++) exit} p && NR > 2' CHANGELOG.md > release-notes.md
uvx --from 'rooster-blue>=0.0.8' --isolated rooster contributors --version=v$VERSION --quiet >> release-notes.md
gh release edit v$VERSION --notes-file release-notes.md