Skip to content

Commit 63fb651

Browse files
committed
Update deployment Github action
1 parent b46b04e commit 63fb651

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/deployment.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,23 @@ jobs:
1616
secrets: ${{ steps.secrets.outputs.secrets }}
1717
build-and-publish:
1818
needs: has
19-
if: ${{ needs.has.outputs.secrets }}
2019
runs-on: ubuntu-latest
2120
steps:
22-
- uses: actions/checkout@v2
23-
- uses: actions/setup-python@v2
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-python@v4
2423
- name: Install dependencies
2524
run: pip install setuptools wheel twine
26-
- name: Build package
25+
- name: Build a binary wheel and a source tarball
2726
run: python setup.py sdist bdist_wheel
28-
- name: Publish package to TestPyPI
29-
uses: pypa/gh-action-pypi-publish@master
27+
- name: Publish distribution 📦 to Test PyPI
28+
if: ${{ needs.has.outputs.secrets }}
29+
uses: pypa/gh-action-pypi-publish@release/v1
3030
with:
31-
user: __token__
3231
password: ${{ secrets.TEST_PYPI_TOKEN }}
3332
repository_url: https://test.pypi.org/legacy/
3433
skip_existing: true
35-
- name: Publish package to PyPI
36-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
37-
uses: pypa/gh-action-pypi-publish@master
34+
- name: Publish distribution 📦 to PyPI
35+
if: startsWith(github.ref, 'refs/tags')
36+
uses: pypa/gh-action-pypi-publish@release/v1
3837
with:
39-
user: __token__
4038
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)