Release 1.2.0 #5
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 to PyPI | |
on: | |
push: | |
tags: | |
- "*" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build dists | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Setup python | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: python -m pip install build | |
- name: Build dists | |
run: python -m build | |
- name: Upload dists | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: "dist" | |
path: "dist/" | |
if-no-files-found: error | |
retention-days: 5 | |
pypi-publish: | |
name: Upload release to PyPI | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [build] | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write # Needed for trusted publishing to PyPI | |
steps: | |
- name: Download dists | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: "dist" | |
path: "dist/" | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3 |