-
-
Notifications
You must be signed in to change notification settings - Fork 132
48 lines (41 loc) · 1.08 KB
/
deploy.yml
File metadata and controls
48 lines (41 loc) · 1.08 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
47
48
name: deploy
on:
release: # when new release created
types: [published]
permissions:
contents: read
jobs:
release-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Build release distributions
run: |
python -m pip install build
python -m build
- name: Upload distributions # upload build artifacts
uses: actions/upload-artifact@v6
with:
name: release-dists
path: dist/
release-publish:
needs:
- release-build
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
steps:
- name: Download all the dists # download build artifacts saved in previous job
uses: actions/download-artifact@v8
with:
name: release-dists
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1