Skip to content

Commit

Permalink
Set up trusted publisher to PyPI (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Feb 15, 2025
1 parent 5a5c5cb commit 8f4cea3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,12 @@ jobs:
name: Publish
runs-on: ubuntu-latest
needs: [test]
if: ${{ github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main' }}
if: github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main'
environment:
name: pypi
url: https://pypi.org/p/wpiformat
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -133,8 +138,5 @@ jobs:
run: python -m build
working-directory: wpiformat

- name: Upload package to PyPi
- name: Upload package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: wpiformat/dist
password: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 8f4cea3

Please sign in to comment.