Skip to content

Commit

Permalink
Add goreleaser check and attempt update (#10428)
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
djaglowski committed Jun 18, 2024
1 parent aa31b27 commit 9bd581b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/check-goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check GoReleaser Config
on:
push:
branches: [main]
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
pull_request:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: ~1.21.5
- name: Check GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
distribution: goreleaser-pro
version: latest
args: check --verbose cmd/builder/.goreleaser.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion cmd/builder/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ checksum:
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
skip: true
disable: true

0 comments on commit 9bd581b

Please sign in to comment.