Skip to content

Commit

Permalink
Merge pull request #14 from rafa-be/pypi_thrusted_publisher
Browse files Browse the repository at this point in the history
PyPI upload workflow uses trusted publisher instead of PyPI API token.
  • Loading branch information
JamieSlome authored Oct 2, 2024
2 parents 2c5c842 + dcb83d6 commit 618b279
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 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
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
persist-credentials: false

Expand Down
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/pargraph?label=license&colorA=0f1632&colorB=255be3">
</a>
<a href="https://pypi.org/project/pargraph/">
<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/pargraph?colorA=0f1632&colorB=255be3">
</a>
</p>
</div>

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

0 comments on commit 618b279

Please sign in to comment.