Skip to content

Commit

Permalink
Use trusted publisher (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx authored Jan 13, 2024
1 parent 664a08c commit ee667f2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/pypi_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
# Setup steps
- name: Setup python
uses: actions/setup-python@v4.2.0
with:
python-version: '3.8'
python-version: '3.9'

- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -27,10 +29,4 @@ jobs:
run: python setup.py sdist bdist_wheel

- name: Publish a Python distribution to PyPI
# Do the publishing
# Might want to add but does not work on workflow_dispatch :
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.token }}
password: ${{ secrets.pypi_password }}
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit ee667f2

Please sign in to comment.