File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 6565
6666 cd :
6767 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+ )
6974 runs-on : ubuntu-latest
7075 steps :
7176 - uses : actions/checkout@v2
@@ -77,14 +82,16 @@ jobs:
7782 run : |
7883 python -m pip install build --user
7984 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.
8188 uses: pypa/gh-action-pypi-publish@v1.4.2
82- if : github.ref == 'refs/heads/main'
89+ if: startsWith( github.ref, 'refs/heads/release-')
8390 with:
8491 user: __token__
8592 password: ${{ secrets.TEST_PYPI_API_TOKEN }}
8693 repository_url: https://test.pypi.org/legacy/
87- - name : Publish to PyPI
94+ - name : Publish to PyPI when tagged
8895 if : startsWith(github.ref, 'refs/tags')
8996 uses : pypa/gh-action-pypi-publish@v1.4.2
9097 with :
You can’t perform that action at this time.
0 commit comments