Skip to content

Commit

Permalink
πŸ’š ci: use trusted publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
ljnsn committed Mar 7, 2024
1 parent 20d0dde commit 579e6bc
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ on:
- "v*"

jobs:
deploy:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
# This permission is needed for private repositories.
contents: read
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pdm>=2.11.1
- name: Publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
run: |
python -m pdm publish
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
- name: Publish package distributions to PyPI
run: pdm publish

0 comments on commit 579e6bc

Please sign in to comment.