Skip to content

Commit

Permalink
fix: Publish using PyPI trusted publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
janw committed Jan 29, 2024
1 parent 3e6e1a1 commit db43927
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 265 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python Package
name: Publish

on:
push:
Expand Down Expand Up @@ -29,22 +29,19 @@ jobs:
if-no-files-found: error
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

publish:
pypi:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
needs: build
steps:
- name: Install poetry
run: pipx install poetry

- uses: actions/download-artifact@v4
with:
name: package

- run: ls dist/*

- name: Publish package
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading

0 comments on commit db43927

Please sign in to comment.