File tree Expand file tree Collapse file tree 2 files changed +64
-8
lines changed
Expand file tree Collapse file tree 2 files changed +64
-8
lines changed Original file line number Diff line number Diff line change 1- name : Upload Python Package
1+ name : Manually Upload Python Package to Pypi
22
3- on :
4- release :
5- types : [published]
3+ on : workflow_dispatch
64
75permissions :
86 contents : read
4442 id-token : write
4543
4644 environment :
47- name : test_pypi
48- url : https://test. pypi.org/p/toggl_python
45+ name : pypi
46+ url : https://pypi.org/p/toggl_python
4947
5048 steps :
5149 - name : Retrieve release distributions
5654
5755 - name : Publish release distributions to PyPI
5856 uses : pypa/gh-action-pypi-publish@release/v1
59- with :
60- repository-url : https://test.pypi.org/legacy/
Original file line number Diff line number Diff line change 1+ name : Upload Python Package to Test Pypi
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : read
9+
10+ env :
11+ PYTHON_VERSION : " 3.8"
12+ POETRY_CORE_VERSION : " 1.9.0"
13+
14+ jobs :
15+ release-build :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - uses : actions/setup-python@v5
22+ with :
23+ python-version : ${{ env.PYTHON_VERSION }}
24+
25+ - name : Build release distributions
26+ run : |
27+ python -m pip install build poetry-core==${{ env.POETRY_CORE_VERSION }}
28+ python -m build
29+
30+ - name : Upload distributions
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : release-dists
34+ path : dist/
35+
36+ pypi-publish :
37+ runs-on : ubuntu-latest
38+
39+ needs :
40+ - release-build
41+
42+ permissions :
43+ # IMPORTANT: this permission is mandatory for trusted publishing
44+ id-token : write
45+
46+ environment :
47+ name : test_pypi
48+ url : https://test.pypi.org/p/toggl_python
49+
50+ steps :
51+ - name : Retrieve release distributions
52+ uses : actions/download-artifact@v4
53+ with :
54+ name : release-dists
55+ path : dist/
56+
57+ - name : Publish release distributions to PyPI
58+ uses : pypa/gh-action-pypi-publish@release/v1
59+ with :
60+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments