Skip to content

Commit

Permalink
switch to 2-stage publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s committed Oct 27, 2024
1 parent db3bc1a commit c457f6a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ jobs:
build:
runs-on: ubuntu-latest
if: github.event.ref_type == 'tag'
permissions:
id-token: write # required for trusted publishing
environment: publish
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,7 +19,24 @@ jobs:
python-version: '${{ steps.python-versions.outputs.min }}'
pre-install: poetry

- uses: actions/upload-artifact@v4
with:
path: ./dist


publish:
needs: build
runs-on: ubuntu-latest
if: github.event.ref_type == 'tag'
permissions:
contents: none
id-token: write # required for trusted publishing
environment: publish
steps:
- uses: actions/download-artifact@v4

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
print-hash: true

0 comments on commit c457f6a

Please sign in to comment.