Skip to content

Commit

Permalink
PyPI upload workflow uses trusted publisher instead of PyPI API token.
Browse files Browse the repository at this point in the history
Signed-off-by: rafa-be <[email protected]>
  • Loading branch information
rafa-be committed Oct 2, 2024
1 parent 67cbc63 commit e3bc4ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,25 @@ permissions:

jobs:
deploy:

runs-on: ubuntu-latest

environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
pip install build
pip install -r requirements.txt
- name: Build package
run: python -m build

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload dist/*
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<a href="./LICENSE">
<img src="https://img.shields.io/github/license/citi/parfun?label=license&colorA=0f1632&colorB=255be3">
</a>
<a href="https://pypi.org/project/parfun/">
<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/parfun?colorA=0f1632&colorB=255be3">
</a>
</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion parfun/about.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "7.0.1"
__version__ = "7.0.2"

0 comments on commit e3bc4ec

Please sign in to comment.