-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.13 KB
/
release.yml
File metadata and controls
46 lines (42 loc) · 1.13 KB
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
44
45
46
name: Publish package to pypi.org
on: push
jobs:
build:
name: Build release artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install pypa/build
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v5
with:
name: dist-files
path: dist/
publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/sphinxcontrib-run/
permissions:
id-token: write
steps:
- name: Download dist files
uses: actions/download-artifact@v6
with:
name: dist-files
path: dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1