Skip to content

0.8.3-rc.1

0.8.3-rc.1 #46

Workflow file for this run

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:
repository-url: https://test.pypi.org/legacy/
- name: Create release
run : |
semantic-release publish --tag ${{ github.ref }}