forked from sphinx-contrib/fulltoc
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.16 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# 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