File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish Python 🐍 distribution 📦 to PyPI
2+
3+ on : push
4+
5+ jobs :
6+ build :
7+ name : Build distribution 📦
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - uses : actions/checkout@v6
12+ with :
13+ persist-credentials : false
14+
15+ - name : Set up Python
16+ uses : actions/setup-python@v6
17+ with :
18+ python-version : " 3.x"
19+
20+ - name : Install pypa/build
21+ run : >-
22+ python3 -m
23+ pip install
24+ build
25+ --user
26+
27+ - name : Build a binary wheel and a source tarball
28+ run : python3 -m build
29+
30+ - name : Store the distribution packages
31+ uses : actions/upload-artifact@v5
32+ with :
33+ name : python-package-distributions
34+ path : dist/
35+
36+ publish-to-pypi :
37+ name : >-
38+ Publish Python 🐍 distribution 📦 to PyPI
39+ if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
40+ needs :
41+ - build
42+ runs-on : ubuntu-latest
43+ environment :
44+ name : pypi
45+ url : https://pypi.org/p/napari-matplotlib # Replace <package-name> with your PyPI project name
46+ permissions :
47+ id-token : write # IMPORTANT: mandatory for trusted publishing
48+
49+ steps :
50+ - name : Download all the dists
51+ uses : actions/download-artifact@v6
52+ with :
53+ name : python-package-distributions
54+ path : dist/
55+ - name : Publish distribution 📦 to PyPI
56+ uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
Original file line number Diff line number Diff line change 8686 with :
8787 token : ${{ secrets.CODECOV_TOKEN }}
8888 fail_ci_if_error : false
89-
90- deploy :
91- # this will run when you have tagged a commit, starting with "v*"
92- # and requires that you have put your twine API key in your
93- # github secrets (see readme for details)
94- needs : [test]
95- runs-on : ubuntu-latest
96- if : contains(github.ref, 'tags')
97- environment : pypi-deploy
98- permissions :
99- id-token : write
100- steps :
101- - uses : actions/checkout@v6
102- with :
103- persist-credentials : false
104- - name : Set up Python
105- uses : actions/setup-python@v6
106- with :
107- python-version : " 3.x"
108- - name : Install build
109- run : |
110- python -m pip install --upgrade pip
111- python -m pip install --upgrade build
112-
113- - name : Build package
114- run : |
115- git tag
116- python -m build .
117-
118- - name : Publish package
119- uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
You can’t perform that action at this time.
0 commit comments