Skip to content

Commit 9bd581b

Browse files
authored
Add goreleaser check and attempt update (#10428)
#10384 updated `goreleaser` to a new major version and this appears to have [broken the config](https://github.com/open-telemetry/opentelemetry-collector/actions/runs/9565775767/job/26369463094). This problem only became apparent during the release process since the config is not used otherwise. This PR adds a github action to run `goreleaser check` on all PRs, since changes to the config may not be caught until release is attempted. I've also included what may be the only necessary change to the config, by [renaming `changelog.skip` to `changelog.disable`](goreleaser/goreleaser@29f30b6). This passes `goreleaser check` when run locally. The `monorepo` section of the config fails locally, but the feature appears to require the Pro version so I'm unclear if it will pass with the OSS version.
1 parent aa31b27 commit 9bd581b

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check GoReleaser Config
2+
on:
3+
push:
4+
branches: [main]
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+*"
7+
pull_request:
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
15+
with:
16+
fetch-depth: 0
17+
- name: Setup Go
18+
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
19+
with:
20+
go-version: ~1.21.5
21+
- name: Check GoReleaser
22+
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
23+
with:
24+
distribution: goreleaser-pro
25+
version: latest
26+
args: check --verbose cmd/builder/.goreleaser.yml
27+
env:
28+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cmd/builder/.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ checksum:
3636
snapshot:
3737
name_template: "{{ .Tag }}-next"
3838
changelog:
39-
skip: true
39+
disable: true

0 commit comments

Comments
 (0)