From 0bd52aa32e28c2bbd770f5c4120f2224788db75b Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Thu, 28 Mar 2024 15:03:55 +0000 Subject: [PATCH] ci: Fix release version Ensures that all release operations happen on the same SHA (i.e. in case main changes while the run is in progress). --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d51a58743..c832287358 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,7 +93,7 @@ jobs: package: ${{ github.event_name == 'workflow_dispatch' || steps.changed.outputs.any_changed == 'true' }} profile: ${{ inputs.profile || 'release' }} publish: ${{ inputs.publish }} - ref: ${{ inputs.ref || github.ref }} + ref: ${{ inputs.ref || github.sha }} tag: "${{ inputs.tag-prefix || 'release/' }}v${{ steps.meta.outputs.version }}" prerelease: ${{ inputs.prerelease }} draft: ${{ inputs.draft }} @@ -191,13 +191,13 @@ jobs: - if: needs.meta.outputs.publish == 'true' uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 with: - name: v${{ env.VERSION }} + name: ${{ env.VERSION }} tag_name: ${{ env.TAG }} files: artifacts/**/* generate_release_notes: true prerelease: ${{ needs.meta.outputs.prerelease }} draft: ${{ needs.meta.outputs.draft }} - - if: needs.meta.outputs.publish == 'true' + - if: needs.meta.outputs.publish == 'true' && needs.meta.outputs.prerelease == 'false' && needs.meta.outputs.draft == 'false' name: Trigger sync-proxy in linkerd2 run: gh workflow run sync-proxy.yml -f version="$VERSION" env: