Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions template/.github/workflows/build.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ jobs:
crate: cargo-edit
bin: cargo-set-version
- name: Update version if PR against main branch
if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }}
run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
- name: Update version if PR against non-main branch
# For PRs to be merged against a release branch, use the version that has already been set in the calling script.
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
Expand Down Expand Up @@ -421,11 +421,11 @@ jobs:
crate: cargo-edit
bin: cargo-set-version
- name: Update version if PR against main branch
if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }}
run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
- name: Update version if PR against non-main branch
# For PRs to be merged against a release branch, use the version that has already been set in the calling script.
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
Expand Down
Loading