Skip to content

Commit 097e319

Browse files
committed
Build releases from the default branch
1 parent 1200e37 commit 097e319

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ jobs:
3030
release:
3131
runs-on: ubuntu-latest
3232
steps:
33-
# Not fetch-depth: 0 nor fetch-tags: true, they would bring in every tag,
34-
# lightweight ones included, which bin/release cannot read.
33+
# The default branch, not the tag: bin/release archives the tag's tree
34+
# (git archive <tag>) but the tooling that does it has to be the current
35+
# one, exactly as when a maintainer runs it from their own checkout.
36+
# Not fetch-depth: 0 nor fetch-tags: true either, they would bring in
37+
# every tag, lightweight ones included, which bin/release cannot read.
3538
- name: Checkout
3639
uses: actions/checkout@v7
3740
with:
38-
ref: ${{ inputs.version || github.ref_name }}
41+
ref: ${{ github.event.repository.default_branch }}
3942
fetch-depth: 1
4043

41-
# On a tag push, checkout writes refs/tags/<tag> pointing straight at the
42-
# commit: a lightweight tag, even though the remote one is annotated.
4344
- name: Fetch the annotated tag
4445
env:
4546
TAG: ${{ inputs.version || github.ref_name }}

0 commit comments

Comments
 (0)