Skip to content

Commit a11b03b

Browse files
authored
Fix unreliable asset generation (#1235)
The goal of this change is to fix the symptoms described in the following two issues: - #1234 - #1059 It seems the goreleaser action that was triggered by the 1.2.1 tag thought that the current tag was 1.2.1.SNAPSHOT.0 ``` git state commit=7b06248484ceeaa947e93ca2747eccf336a88ecc branch=HEAD current_tag=v1.2.1-SNAPSHOT.0 previous_tag=v1.2.0 ``` Source: https://github.com/bufbuild/protoc-gen-validate/actions/runs/12916704001/job/36021453853#step:5:21 Basically we ended up with two tags pointing at the same commit and goreleaser picked one: goreleaser/goreleaser#4134 We were unnecessarily increasing the likelihood of that happening by force fetching all tags (which is unnecessary because we will already have the intended tag fetched that triggered the push), so I removed that step here: 87dc0be Additionally, I don't think there is any value in having snapshot tags at all so I deleted the entire version bump workflow here: 79a4a4f Furthermore, we had goreleaser configured to publish drafts, which doesn't make sense if we want to initiate release from the GitHub UI (which I think we do and is similer/easier) so I deleted all the extra config here: 56f26d0 The default config is the right thing for us. Finally there were some settings in setup-go we had configured that have no effect now, so I removed them: 33528d7
1 parent 3741177 commit a11b03b

File tree

4 files changed

+0
-323
lines changed

4 files changed

+0
-323
lines changed

.github/actions/github-tag-action/entrypoint.sh

Lines changed: 0 additions & 229 deletions
This file was deleted.

.github/workflows/goreleaser.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
- run: git fetch --force --tags
2019
- uses: actions/setup-go@v5
2120
with:
2221
go-version: 1.21.x
23-
use-latest: true
24-
cache: true
2522
- uses: goreleaser/goreleaser-action@v6
2623
with:
2724
distribution: goreleaser

.github/workflows/version-bump.yaml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.goreleaser.yaml

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -20,47 +20,3 @@ builds:
2020
binary: "protoc-gen-validate-java"
2121
env:
2222
- CGO_ENABLED=0
23-
24-
release:
25-
# If set to true, will not auto-publish the release.
26-
# Available only for GitHub and Gitea.
27-
# Default is false.
28-
draft: true
29-
30-
# Whether to remove existing draft releases with the same name before creating a new one.
31-
# Only effective if `draft` is set to true.
32-
# Available only for GitHub.
33-
#
34-
# Default: false.
35-
# Since: v1.11.
36-
replace_existing_draft: true
37-
38-
# Useful if you want to delay the creation of the tag in the remote.
39-
# You can create the tag locally, but not push it, and run GoReleaser.
40-
# It'll then set the `target_commitish` portion of the GitHub release to the value of this field.
41-
# Only works on GitHub.
42-
#
43-
# Default: empty.
44-
# Since: v1.11.
45-
target_commitish: "{{ .Commit }}"
46-
47-
# If set to auto, will mark the release as not ready for production
48-
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
49-
# If set to true, will mark the release as not ready for production.
50-
# Default is false.
51-
prerelease: auto
52-
53-
# What to do with the release notes in case there the release already exists.
54-
#
55-
# Valid options are:
56-
# - `keep-existing`: keep the existing notes
57-
# - `append`: append the current release notes to the existing notes
58-
# - `prepend`: prepend the current release notes to the existing notes
59-
# - `replace`: replace existing notes
60-
#
61-
# Default is `keep-existing`.
62-
mode: keep-existing
63-
64-
# You can change the name of the release.
65-
# Default is `{{.Tag}}` on OSS and `{{.PrefixedTag}}` on Pro.
66-
name_template: "{{.Tag}}"

0 commit comments

Comments
 (0)