Commit 8738f3f 1 parent 49858c0 commit 8738f3f Copy full SHA for 8738f3f
File tree 2 files changed +24
-21
lines changed
2 files changed +24
-21
lines changed Original file line number Diff line number Diff line change 54
54
flags : python-${{ matrix.python-version }}
55
55
verbose : true # optional (default = false)
56
56
env_vars : OS,PYTHON
57
+
58
+ # Upload to Test PyPI.
59
+ release-test-pypi :
60
+ name : Publish in-dev package to test.pypi.org
61
+ runs-on : ubuntu-latest
62
+ steps :
63
+ - uses : actions/checkout@v3
64
+ with :
65
+ token : ${{ secrets.PAT }}
66
+
67
+ - name : Package
68
+ uses : hynek/build-and-inspect-python-package@v1
69
+
70
+ - name : Upload package to Test PyPI
71
+ uses : pypa/gh-action-pypi-publish@release/v1
72
+ with :
73
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
74
+ repository-url : https://test.pypi.org/legacy/
Original file line number Diff line number Diff line change 3
3
push :
4
4
tags : ["*"]
5
5
workflow_dispatch :
6
+ inputs :
7
+ tag_name :
8
+ description : The name of the tag to release
9
+ type : string
10
+ required : true
6
11
7
12
jobs :
8
13
# Package when a new tag is pushed
9
14
build-package :
10
- if : startsWith(github.ref, 'refs/tags/')
11
15
runs-on : ubuntu-latest
12
16
steps :
13
17
- uses : actions/checkout@v3
@@ -21,10 +25,10 @@ jobs:
21
25
# Create a GitHub release
22
26
release :
23
27
name : Create a GitHub release
24
- if : startsWith(github.ref, 'refs/tags/')
25
28
runs-on : ubuntu-latest
26
29
needs : build-package
27
30
steps :
31
+ - uses : actions/checkout@v3
28
32
- name : Parse changelog
29
33
shell : bash
30
34
run : |
70
74
tag_name : " ${{ env.TAG_NAME }}"
71
75
body : " ${{ env.RELEASE_NOTES }}"
72
76
73
- # Upload to Test PyPI.
74
- release-test-pypi :
75
- name : Publish in-dev package to test.pypi.org
76
- if : startsWith(github.ref, 'refs/tags/')
77
- runs-on : ubuntu-latest
78
- needs : build-package
79
- steps :
80
- - name : Download packages built by build-and-inspect-python-package
81
- uses : actions/download-artifact@v3
82
- with :
83
- name : Packages
84
- path : dist
85
-
86
- - name : Upload package to Test PyPI
87
- uses : pypa/gh-action-pypi-publish@release/v1
88
- with :
89
- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
90
- repository-url : https://test.pypi.org/legacy/
91
-
92
77
# Upload to real PyPI on GitHub Releases.
93
78
release-pypi :
94
79
name : Publish released package to pypi.org
You can’t perform that action at this time.
0 commit comments