Skip to content

v1.0.0

v1.0.0 #36

Workflow file for this run

name: Upload PyPI Release
on:
release:
types: [published]
jobs:
build:
name: Build package
runs-on: ubuntu-latest
environment:
name: release
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set VERSION variable from tag
run: |
VERSION=${{github.head_ref}}
echo "VERSION=${VERSION##*/}" >> $GITHUB_ENV
- uses: astral-sh/setup-uv@v6
- name: Build release
run: |
uv build
- uses: actions/upload-artifact@v4
with:
name: package
path: dist/
publish:
name: Publish on PyPI
runs-on: ubuntu-latest
environment:
name: release
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing
id-token: write
needs: build
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Download built artifact
uses: actions/download-artifact@v5
with:
name: package
path: dist
- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@release/v1