You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will upload a Python Package using Twine when a release is created
1
+
# This workflow will upload a Python Package to PyPI when a release is created
3
2
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
4
3
5
4
# This workflow uses actions that are not certified by GitHub.
@@ -17,24 +16,50 @@ permissions:
17
16
contents: read
18
17
19
18
jobs:
20
-
deploy:
19
+
release-build:
20
+
runs-on: ubuntu-latest
21
+
22
+
steps:
23
+
- uses: actions/checkout@v4
24
+
25
+
- uses: actions/setup-python@v5
26
+
with:
27
+
python-version: "3.x"
21
28
29
+
- name: Build release distributions
30
+
run: |
31
+
# NOTE: put your own distribution build steps here.
32
+
python -m pip install build
33
+
python -m build
34
+
35
+
- name: Upload distributions
36
+
uses: actions/upload-artifact@v4
37
+
with:
38
+
name: release-dists
39
+
path: dist/
40
+
41
+
pypi-publish:
22
42
runs-on: ubuntu-latest
43
+
needs:
44
+
- release-build
45
+
permissions:
46
+
# IMPORTANT: this permission is mandatory for trusted publishing
47
+
id-token: write
48
+
49
+
# Dedicated environments with protections for publishing are strongly recommended.
50
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
0 commit comments