Skip to content

ci: switch to python-semantic-release for automated versioning #1

ci: switch to python-semantic-release for automated versioning

ci: switch to python-semantic-release for automated versioning #1

Workflow file for this run

name: Release and PyPI Publish
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v9.15.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build package
if: steps.release.outputs.released == 'true'
run: uv build
- name: Publish to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish to GitHub Releases
if: steps.release.outputs.released == 'true'
uses: python-semantic-release/publish-action@v9.15.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}