Skip to content

Commit

Permalink
Add publish-to-pypi action job
Browse files Browse the repository at this point in the history
  • Loading branch information
Yibo-Chen13 committed Oct 31, 2024
1 parent f8cd537 commit 20141d4
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 , windows-2019, macos-11 ]
os: [ ubuntu-20.04 , windows-2019, macos-12 ]
steps:
- uses: actions/checkout@v4
- name: Get proton-python-driver tag
Expand Down Expand Up @@ -49,3 +49,30 @@ jobs:
tag_name: ${{ join(steps.*.outputs.tag_name, '') }}
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: wheelhouse/*.whl

publish-to-pypi:
name: Publish Python distribution to PyPI
needs:
- build_wheels
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/proton-driver
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
username: __token__
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 20141d4

Please sign in to comment.