diff --git a/.github/workflows/release-cherry-pick.yml b/.github/workflows/release-cherry-pick.yml index bf2247c..ac5e5c0 100644 --- a/.github/workflows/release-cherry-pick.yml +++ b/.github/workflows/release-cherry-pick.yml @@ -30,8 +30,10 @@ jobs: - name: Cherry-pick commit run: | - echo "Cherry-picking ${{ inputs.commit_sha }} to release/candidate" - git cherry-pick ${{ inputs.commit_sha }} + echo "Cherry-picking ${INPUTS_COMMIT_SHA} to release/candidate" + git cherry-pick ${INPUTS_COMMIT_SHA} + env: + INPUTS_COMMIT_SHA: ${{ inputs.commit_sha }} - name: Push changes run: | diff --git a/.github/workflows/release-finalize.yml b/.github/workflows/release-finalize.yml index ade58ec..b9d6203 100644 --- a/.github/workflows/release-finalize.yml +++ b/.github/workflows/release-finalize.yml @@ -68,9 +68,11 @@ jobs: - name: Rename release/candidate to release/v{version} if: steps.check.outputs.is_release_pr == 'true' run: | - VERSION="v${{ steps.version.outputs.version }}" + VERSION="v${STEPS_VERSION_OUTPUTS_VERSION}" git push origin "release/candidate:refs/heads/release/$VERSION" ":release/candidate" echo "Renamed release/candidate to release/$VERSION" + env: + STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }} - name: Update PR label to tagged if: steps.check.outputs.is_release_pr == 'true' diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 5979cd9..95ee326 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Validate branch run: | - if [[ ! "${{ github.ref_name }}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + if [[ ! "${GITHUB_REF_NAME}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Error: Must run from a release/v* branch (e.g., release/v0.3.0)" exit 1 fi @@ -23,7 +23,7 @@ jobs: - name: Extract version id: version run: | - VERSION="${{ github.ref_name }}" + VERSION="${GITHUB_REF_NAME}" VERSION="${VERSION#release/v}" echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Publishing version: $VERSION" @@ -51,9 +51,10 @@ jobs: - name: Create merge-back PR env: GH_TOKEN: ${{ secrets.RELEASE_PAT }} + STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }} run: | gh pr create \ --base main \ - --head "${{ github.ref_name }}" \ - --title "chore: merge release v${{ steps.version.outputs.version }} to main" \ - --body "Syncs version bump and CHANGELOG from release v${{ steps.version.outputs.version }} to main." + --head "${GITHUB_REF_NAME}" \ + --title "chore: merge release v${STEPS_VERSION_OUTPUTS_VERSION} to main" \ + --body "Syncs version bump and CHANGELOG from release v${STEPS_VERSION_OUTPUTS_VERSION} to main."