Skip to content

Semantic Release

Semantic Release #14

Workflow file for this run

name: Semantic Release
on:
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python for test Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish to pypi
if: steps.release.outputs.released == 'true'
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
pip install poetry
poetry build
poetry publish