File tree Expand file tree Collapse file tree 2 files changed +66
-28
lines changed Expand file tree Collapse file tree 2 files changed +66
-28
lines changed Original file line number Diff line number Diff line change 11name : Publish netZooPy to PyPI and TestPyPI
22
33on :
4- push :
4+ release :
55 branches :
66 - master
7- - devel
87jobs :
98 build :
109 name : Build distribution
3837 publish-to-pypi :
3938 name : >-
4039 Publish netZooPy distribution to PyPI
41- if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
4240 needs :
4341 - build
4442 runs-on : ubuntu-latest
9997 gh release upload
10098 '${{ github.ref_name }}' dist/**
10199 --repo '${{ github.repository }}'
102-
103- publish-to-testpypi :
104- name : Publish Python distribution to TestPyPI
105- if : ${{ !startsWith(github.ref, 'refs/tags') }}
106- needs :
107- - build
108- runs-on : ubuntu-latest
109-
110- environment :
111- name : testpypi
112- url : https://test.pypi.org/p/netZooPy
113-
114- permissions :
115- id-token : write # IMPORTANT: mandatory for trusted publishing
116-
117- steps :
118- - name : Download all the dists
119- uses : actions/download-artifact@v4
120- with :
121- name : python-package-distributions
122- path : dist/
123- - name : Publish distribution to TestPyPI
124- uses : pypa/gh-action-pypi-publish@release/v1
125- with :
126- repository-url : https://test.pypi.org/legacy/
Original file line number Diff line number Diff line change 1+ name : Test Publish netZooPy to PyPI and TestPyPI
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ - devel
8+ jobs :
9+ build :
10+ name : Build distribution
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ os : [ubuntu-latest]
15+ python-version : ['3.10']
16+
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+ - name : Set up Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : " 3.x"
24+ - name : Install pypa/build
25+ run : >-
26+ python3 -m
27+ pip install
28+ build
29+ --user
30+ - name : Build a binary wheel and a source tarball
31+ run : python3 -m build
32+ - name : Store the distribution packages
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : python-package-distributions
36+ path : dist/
37+
38+ publish-to-testpypi :
39+ name : Publish Python distribution to TestPyPI
40+ if : ${{ !startsWith(github.ref, 'refs/tags') }}
41+ needs :
42+ - build
43+ runs-on : ${{ matrix.os }}
44+ strategy :
45+ matrix :
46+ os : [ubuntu-latest]
47+ python-version : ['3.10']
48+
49+ environment :
50+ name : testpypi
51+ url : https://test.pypi.org/p/netZooPy
52+
53+ permissions :
54+ id-token : write # IMPORTANT: mandatory for trusted publishing
55+
56+ steps :
57+ - name : Download all the dists
58+ uses : actions/download-artifact@v4
59+ with :
60+ name : python-package-distributions
61+ path : dist/
62+ - name : Publish distribution to TestPyPI
63+ uses : pypa/gh-action-pypi-publish@release/v1
64+ with :
65+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments