Skip to content

Commit d91421a

Browse files
authored
ci: Fix release version (#2846)
Ensures that all release operations happen on the same SHA (i.e. in case main changes while the run is in progress).
1 parent ba26685 commit d91421a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
package: ${{ github.event_name == 'workflow_dispatch' || steps.changed.outputs.any_changed == 'true' }}
9494
profile: ${{ inputs.profile || 'release' }}
9595
publish: ${{ inputs.publish }}
96-
ref: ${{ inputs.ref || github.ref }}
96+
ref: ${{ inputs.ref || github.sha }}
9797
tag: "${{ inputs.tag-prefix || 'release/' }}v${{ steps.meta.outputs.version }}"
9898
prerelease: ${{ inputs.prerelease }}
9999
draft: ${{ inputs.draft }}
@@ -191,13 +191,13 @@ jobs:
191191
- if: needs.meta.outputs.publish == 'true'
192192
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564
193193
with:
194-
name: v${{ env.VERSION }}
194+
name: ${{ env.VERSION }}
195195
tag_name: ${{ env.TAG }}
196196
files: artifacts/**/*
197197
generate_release_notes: true
198198
prerelease: ${{ needs.meta.outputs.prerelease }}
199199
draft: ${{ needs.meta.outputs.draft }}
200-
- if: needs.meta.outputs.publish == 'true'
200+
- if: needs.meta.outputs.publish == 'true' && needs.meta.outputs.prerelease == 'false' && needs.meta.outputs.draft == 'false'
201201
name: Trigger sync-proxy in linkerd2
202202
run: gh workflow run sync-proxy.yml -f version="$VERSION"
203203
env:

0 commit comments

Comments
 (0)