From 8e8637c525ddc07ba2958ab42ce8739ff78a7a1a Mon Sep 17 00:00:00 2001 From: Arya Massarat <23412689+aryarm@users.noreply.github.com> Date: Wed, 19 Jun 2024 12:11:44 -0700 Subject: [PATCH] separate pyp uploading step into separate job in release workflow --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a14fe7b..88afbf89 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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/gh-action-pypi-publish@v1.8.14