Skip to content

Commit 58ee9d0

Browse files
committed
do not set version when merging to a release branch
1 parent 7b7c3fb commit 58ee9d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ jobs:
345345
crate: cargo-edit
346346
bin: cargo-set-version
347347
- name: Update version if PR
348-
if: ${{ github.event_name == 'pull_request' }}
348+
# For PRs to be merged against a release branch, the version has already been set, in which case ignore this step.
349+
if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }}
349350
run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
350351

351352
# Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the

0 commit comments

Comments
 (0)