Skip to content

Bump version: 7.0.1 → 7.0.2 #1

Bump version: 7.0.1 → 7.0.2

Bump version: 7.0.1 → 7.0.2 #1

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
env:
LATEST_PY_VERSION: '3.14'
jobs:
build:
name: Build dist
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.*"
enable-cache: true
python-version: ${{ env.LATEST_PY_VERSION }}
- name: Install dependencies
run: |
uv sync --group deploy
- name: Set tag version
id: tag
run: |
echo "version=${GITHUB_REF#refs/*/}"
echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Set module version
id: module
run: |
echo "version=$(uv run hatch --quiet version)" >> $GITHUB_OUTPUT
- name: Check version match
run: |
if [ "${{ steps.tag.outputs.version }}" != "${{ steps.module.outputs.version }}" ]; then
echo "Tag version (${{ steps.tag.outputs.version }}) does not match module version (${{ steps.module.outputs.version }})"
exit 1
fi
- name: Build
run: |
uv run hatch build
- uses: actions/upload-artifact@v7
with:
path: ./dist/
upload_pypi:
name: Upload release to PyPI
needs: [build]
runs-on: ubuntu-latest
environment:
# Note: this environment must be configured in the repo settings
name: pypi-release
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v8
with:
name: artifact
path: dist
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1