Skip to content

ci(workflows): simplify release pipeline to use python-semantic-relea… #6

ci(workflows): simplify release pipeline to use python-semantic-relea…

ci(workflows): simplify release pipeline to use python-semantic-relea… #6

Workflow file for this run

name: Release
on:
push:
branches: [main]
workflow_dispatch:
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
concurrency:
group: release
cancel-in-progress: false
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install build tools
run: python -m pip install -U pip build
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build package
if: steps.release.outputs.released == 'true'
run: python -m build
- name: Publish to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true