@@ -11,86 +11,43 @@ jobs:
11
11
runs-on : ubuntu-latest
12
12
13
13
steps :
14
- - uses : actions/checkout@v4
15
- - name : Set up Python
16
- uses : actions/setup-python@v4
17
- with :
18
- python-version : " 3.x"
19
- - name : Install pypa/build
20
- run : >-
21
- python3 -m
22
- pip install
23
- build
24
- --user
25
- - name : Build a binary wheel and a source tarball
26
- run : python3 -m build
27
- - name : Store the distribution packages
28
- uses : actions/upload-artifact@v3
29
- with :
30
- name : python-package-distributions
31
- path : dist/
14
+ - uses : actions/checkout@v4
15
+ - name : Set up Python
16
+ uses : actions/setup-python@v5
17
+ with :
18
+ python-version : " 3.x"
19
+ - name : Install pypa/build
20
+ run : >-
21
+ python3 -m
22
+ pip install
23
+ build
24
+ --user
25
+ - name : Build a binary wheel and a source tarball
26
+ run : python3 -m build
27
+ - name : Store the distribution packages
28
+ uses : actions/upload-artifact@v4
29
+ with :
30
+ name : python-package-distributions
31
+ path : dist/
32
32
33
33
publish-to-pypi :
34
34
name : >-
35
35
Publish Python 🐍 distribution 📦 to PyPI
36
- if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
36
+ if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
37
37
needs :
38
- - build
38
+ - build
39
39
runs-on : ubuntu-latest
40
40
environment :
41
41
name : pypi
42
- url : https://pypi.org/p/wb-template # Replace with your PyPI project name
42
+ url : https://pypi.org/p/wb-template # Replace <package-name> with your PyPI project name
43
43
permissions :
44
- id-token : write # IMPORTANT: mandatory for trusted publishing
44
+ id-token : write # IMPORTANT: mandatory for trusted publishing
45
45
46
46
steps :
47
- - name : Download all the dists
48
- uses : actions/download-artifact@v3
49
- with :
50
- name : python-package-distributions
51
- path : dist/
52
- - name : Publish distribution 📦 to PyPI
53
- uses : pypa/gh-action-pypi-publish@release/v1
54
-
55
- github-release :
56
- name : >-
57
- Sign the Python 🐍 distribution 📦 with Sigstore
58
- and upload them to GitHub Release
59
- needs :
60
- - publish-to-pypi
61
- runs-on : ubuntu-latest
62
-
63
- permissions :
64
- contents : write # IMPORTANT: mandatory for making GitHub Releases
65
- id-token : write # IMPORTANT: mandatory for sigstore
66
-
67
- steps :
68
- - name : Download all the dists
69
- uses : actions/download-artifact@v3
70
- with :
71
- name : python-package-distributions
72
- path : dist/
73
- - name : Sign the dists with Sigstore
74
- uses : sigstore/gh-action-sigstore-python@v1.2.3
75
- with :
76
- inputs : >-
77
- ./dist/*.tar.gz
78
- ./dist/*.whl
79
- - name : Create GitHub Release
80
- env :
81
- GITHUB_TOKEN : ${{ github.token }}
82
- run : >-
83
- gh release create
84
- '${{ github.ref_name }}'
85
- --repo '${{ github.repository }}'
86
- --notes ""
87
- - name : Upload artifact signatures to GitHub Release
88
- env :
89
- GITHUB_TOKEN : ${{ github.token }}
90
- # Upload to GitHub Release using the `gh` CLI.
91
- # `dist/` contains the built packages, and the
92
- # sigstore-produced signatures and certificates.
93
- run : >-
94
- gh release upload
95
- '${{ github.ref_name }}' dist/**
96
- --repo '${{ github.repository }}'
47
+ - name : Download all the dists
48
+ uses : actions/download-artifact@v4
49
+ with :
50
+ name : python-package-distributions
51
+ path : dist/
52
+ - name : Publish distribution 📦 to PyPI
53
+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments