88 runs-on : ubuntu-latest
99
1010 steps :
11- - uses : actions/checkout@v4
12- - name : Set up Python
13- uses : actions/setup-python@v4
14- with :
15- python-version : " 3.x"
16- - name : Install pypa/build
17- run : >-
18- python3 -m
19- pip install
20- build
21- --user
22- - name : Build a binary wheel and a source tarball
23- run : python3 -m build
24- - name : Store the distribution packages
25- uses : actions/upload-artifact@v3
26- with :
27- name : python-package-distributions
28- path : dist/
11+ - uses : actions/checkout@v4
12+ - name : Set up Python
13+ uses : actions/setup-python@v4
14+ with :
15+ python-version : " 3.x"
16+ - name : Install pypa/build
17+ run : >-
18+ python3 -m
19+ pip install
20+ build
21+ --user
22+ - name : Build a binary wheel and a source tarball
23+ run : python3 -m build
24+ - name : Store the distribution packages
25+ uses : actions/upload-artifact@v4
26+ with :
27+ name : python-package-distributions
28+ path : dist/
2929
3030 publish-to-pypi :
3131 name : >-
3232 Publish Python 🐍 distribution 📦 to PyPI
33- if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
33+ if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3434 needs :
35- - build
35+ - build
3636 runs-on : ubuntu-latest
3737 environment :
3838 name : pypi
@@ -41,42 +41,42 @@ jobs:
4141 id-token : write
4242
4343 steps :
44- - name : Download all the dists
45- uses : actions/download-artifact@v3
46- with :
47- name : python-package-distributions
48- path : dist/
49- - name : Publish distribution 📦 to PyPI
50- uses : pypa/gh-action-pypi-publish@release/v1
44+ - name : Download all the dists
45+ uses : actions/download-artifact@v4
46+ with :
47+ name : python-package-distributions
48+ path : dist/
49+ - name : Publish distribution 📦 to PyPI
50+ uses : pypa/gh-action-pypi-publish@release/v1
5151
5252 github-release :
5353 name : >-
5454 Upload distribution to GitHub Release
5555 needs :
56- - publish-to-pypi
56+ - publish-to-pypi
5757 runs-on : ubuntu-latest
5858
5959 permissions :
60- contents : write # IMPORTANT: mandatory for making GitHub Releases
60+ contents : write # IMPORTANT: mandatory for making GitHub Releases
6161
6262 steps :
63- - name : Download all the dists
64- uses : actions/download-artifact@v3
65- with :
66- name : python-package-distributions
67- path : dist/
68- - name : Create GitHub Release
69- env :
70- GITHUB_TOKEN : ${{ github.token }}
71- run : >-
72- gh release create
73- '${{ github.ref_name }}'
74- --repo '${{ github.repository }}'
75- --notes ""
76- - name : Upload artifacts to GitHub Release
77- env :
78- GITHUB_TOKEN : ${{ github.token }}
79- run : >-
80- gh release upload
81- '${{ github.ref_name }}' dist/**
82- --repo '${{ github.repository }}'
63+ - name : Download all the dists
64+ uses : actions/download-artifact@v4
65+ with :
66+ name : python-package-distributions
67+ path : dist/
68+ - name : Create GitHub Release
69+ env :
70+ GITHUB_TOKEN : ${{ github.token }}
71+ run : >-
72+ gh release create
73+ '${{ github.ref_name }}'
74+ --repo '${{ github.repository }}'
75+ --notes ""
76+ - name : Upload artifacts to GitHub Release
77+ env :
78+ GITHUB_TOKEN : ${{ github.token }}
79+ run : >-
80+ gh release upload
81+ '${{ github.ref_name }}' dist/**
82+ --repo '${{ github.repository }}'
0 commit comments