File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 65
65
66
66
cd :
67
67
needs : ci
68
- if : github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/main')
68
+ if : |
69
+ github.event_name == 'push' &&
70
+ (
71
+ startsWith(github.ref, 'refs/tags') ||
72
+ startsWith(github.ref, 'refs/heads/release-')
73
+ )
69
74
runs-on : ubuntu-latest
70
75
steps :
71
76
- uses : actions/checkout@v2
@@ -77,14 +82,16 @@ jobs:
77
82
run : |
78
83
python -m pip install build --user
79
84
python -m build --sdist --wheel --outdir dist/ .
80
- - name : Publish to TestPyPI
85
+ - name : |
86
+ Publish to TestPyPI when pushing to release-* branch.
87
+ You better test with a1, a2, b1, b2 releases first.
81
88
uses: pypa/gh-action-pypi-publish@v1.4.2
82
- if : github.ref == 'refs/heads/main'
89
+ if: startsWith( github.ref, 'refs/heads/release-')
83
90
with:
84
91
user: __token__
85
92
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
86
93
repository_url: https://test.pypi.org/legacy/
87
- - name : Publish to PyPI
94
+ - name : Publish to PyPI when tagged
88
95
if : startsWith(github.ref, 'refs/tags')
89
96
uses : pypa/gh-action-pypi-publish@v1.4.2
90
97
with :
You can’t perform that action at this time.
0 commit comments