diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7b2dcb7d..880d0f5e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,6 +8,8 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + RELEASE_PUBLISHED: ${{ steps.semantic-release.outputs.RELEASE_PUBLISHED }} permissions: contents: write # to be able to publish a GitHub release issues: write # to be able to comment on released issues @@ -24,6 +26,7 @@ jobs: with: node-version: "lts/*" - name: Release + id: semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }} @@ -31,6 +34,7 @@ jobs: npm install npx semantic-release trigger-pipeline: + if: needs.release.outputs.RELEASE_PUBLISHED == 'true' runs-on: ubuntu-latest needs: release steps: diff --git a/.releaserc.yaml b/.releaserc.yaml index 4c9cb35f..81184e0e 100644 --- a/.releaserc.yaml +++ b/.releaserc.yaml @@ -8,6 +8,7 @@ plugins: - - "@semantic-release/exec" - verifyReleaseCmd: ./ci/update-versions.sh ${nextRelease.version} && ./ci/build-test.sh publishCmd: ./ci/pypi-publish.sh + successCmd: ./ci/semantic-release-success.sh - - "@semantic-release/git" - assets: - src/rapids_dependency_file_generator/_version.py diff --git a/ci/semantic-release-success.sh b/ci/semantic-release-success.sh new file mode 100755 index 00000000..26847f50 --- /dev/null +++ b/ci/semantic-release-success.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -euo pipefail + +echo "RELEASE_PUBLISHED=true" | tee --append "${GITHUB_OUTPUT:-/dev/null}"