Stop using local version label #4
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
# based on https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
name: publish package to pypi | |
on: push | |
jobs: | |
build: | |
name: Build distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: build distribution | |
run: pipx run build[uv] --installer=uv | |
- name: upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
publish: | |
name: Publish Distribution | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: | |
- build | |
environment: | |
name: release | |
url: https://pypi.org/p/sphinxcontrib-fulltoc-agdsn | |
permissions: | |
id-token: write | |
steps: | |
- name: grab artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: publish to pypi | |
uses: pypa/gh-action-pypi-publish@release/v1 |