6.0.0rc1 #125
Workflow file for this run
This file contains hidden or 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: Release | |
"on": | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
release: | |
if: github.repository_owner == 'PyCQA' | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Set Tag env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Install UV | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: ">=0.5.24" | |
- name: Install dependencies | |
run: | | |
uv sync --all-extras --frozen | |
- name: Check if there is a parent commit | |
id: check-parent-commit | |
run: | | |
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)" | |
- name: Build package | |
run: | | |
uv build | |
- name: Publish package on PyPI | |
if: steps.check-version.outputs.tag | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
- name: Publish the release notes | |
uses: release-drafter/release-drafter@v6 | |
with: | |
publish: ${{ steps.check-version.outputs.tag != '' }} | |
tag: ${{ steps.check-version.outputs.tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |