Skip to content

Commit

Permalink
separate pyp uploading step into separate job in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aryarm authored Jun 19, 2024
1 parent c2c5293 commit 8e8637c
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: GoogleCloudPlatform/release-please-action@v4.0.2
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: python
Expand Down Expand Up @@ -47,6 +45,26 @@ jobs:
run: |
poetry build --ansi -n
- name: Publish package on PyPI
- uses: actions/upload-artifact@v4
if: ${{ steps.release.outputs.release_created }}
with:
name: dist
path: dist/

upload_pypi:
needs: release
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.release_created }}
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Get artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist

- name: Publish package on PyPI
uses: pypa/[email protected]

0 comments on commit 8e8637c

Please sign in to comment.