0.8.2-rc.1 #44
Workflow file for this run
This file contains 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: | |
- 'v*.*.*' | |
- 'v*.*.*-rc.*' | |
jobs: | |
pypi-publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
# Specifying a GitHub environment is optional, but strongly encouraged | |
environment: release | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
# Checkout the tag that triggered the workflow | |
with: | |
ref: ${{ github.ref }} | |
- uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[dev] | |
- name: Build package | |
run: | | |
python -m build | |
- name: Publish package distributions to PyPI | |
# Only run if the tag is a release | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'rc') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Publish package to Test PyPI | |
# Only run if the tag is a release candidate | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'rc') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
server: https://test.pypi.org/legacy/ | |
- name: Create release | |
run : | | |
semantic-release publish |