Skip to content

Commit

Permalink
Add configuration for pypi trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Apr 11, 2024
1 parent f519a00 commit 67049a2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@ on:
# normal behavior: run when a new release is created
release:
types: [published]
# allow running manually
# allow running manually on main
workflow_dispatch:
branches: [main]

permissions:
contents: read

jobs:
deploy:

pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/parasolr/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- uses: actions/checkout@v4
Expand All @@ -36,4 +42,4 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 67049a2

Please sign in to comment.