Skip to content

Commit

Permalink
Merge branch 'update-release-script'
Browse files Browse the repository at this point in the history
  • Loading branch information
coldfix committed Nov 23, 2023
2 parents c9987ff + 782def7 commit 2e59e2f
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- "3.7"
- "3.8"
- "3.9"
- "3.10"

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -41,31 +42,23 @@ jobs:
- run: python test/test_match.py

- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
if: startsWith(github.ref, 'refs/tags/v') &&
matrix.os == 'ubuntu-20.04' &&
with: {name: dist, path: dist/}
if: matrix.os == 'ubuntu-20.04' &&
matrix.python == '3.9'

deploy:
name: Upload release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v') && success()
environment:
name: pypi
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install twine

- name: Publish PyPI package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*.whl dist/*.tar.gz
with: {name: dist, path: dist/}
- uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/

0 comments on commit 2e59e2f

Please sign in to comment.