Skip to content

Commit 3bd8068

Browse files
authored
chore(ci): build release assets from trigger tag (googleapis#1528)
Now that we have a `v2` branch that we want to make a release candidate from, we need to ensure that if we tag a release from that branch, we build release assets from that tag specifically - not from `main`. This changes the `checkout` action to specifically checkout the release tag prior to building anything. This is also a general improvement for the `main` branch as it ensures the assets we build/upload are from the exact same tag rather than whatever is in `main` when the release was created (which may be after the tag was created in non-Release-Please cases, which would be exceptional).
1 parent e9306c6 commit 3bd8068

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
arch: amd64
3131
steps:
3232
- uses: actions/checkout@v5
33+
with:
34+
ref: ${{ github.event.release.tag_name }}
3335
- uses: actions/setup-go@v5
3436
with:
3537
go-version-file: 'go.mod'

0 commit comments

Comments
 (0)