File tree 2 files changed +64
-8
lines changed
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
2
2
3
- on :
4
- release :
5
- types : [published]
3
+ on : workflow_dispatch
6
4
7
5
permissions :
8
6
contents : read
44
42
id-token : write
45
43
46
44
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
49
47
50
48
steps :
51
49
- name : Retrieve release distributions
56
54
57
55
- name : Publish release distributions to PyPI
58
56
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