Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
# push:
# tags:
# - v*
workflow_call:
workflow_dispatch:
concurrency: release-${{ github.ref }}
jobs:
release:
if: startsWith(github.ref, 'refs/tags/v')
name: Create release
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
steps:
- name: Download sdist artifact
uses: actions/download-artifact@v6
with:
name: sdist
path: ./dist
- name: Download wheels artifact
uses: actions/download-artifact@v6
with:
name: wheels
path: ./dist
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: ./dist/*
publish:
if: startsWith(github.ref, 'refs/tags/v')
name: Publish package to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Download sdist artifact
uses: actions/download-artifact@v6
with:
name: sdist
path: ./dist
- name: Download wheels artifact
uses: actions/download-artifact@v6
with:
name: wheels
path: ./dist
- name: Upload distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}