Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(release): fix goreleaser config to be compatible with v2 #137

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,28 @@ jobs:
- name: Ensure generated documentation is up to date
run: mv docs docs-current && make docs && diff -rN docs-current docs

goreleaser-config:
name: Goreleaser Config
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: goreleaser check
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: check

release-please:
name: Release Please
runs-on: ubuntu-latest
needs: [lint, lint-provider, tidy, test, docs]
needs: [lint, lint-provider, tidy, test, docs, goreleaser-config]
if: github.ref == 'refs/heads/main'
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
Expand Down
12 changes: 10 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
before:
hooks:
- go mod tidy
Expand All @@ -24,12 +25,15 @@ builds:
ignore:
- goos: darwin
goarch: "386"

archives:
- format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"

checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256

signs:
- artifacts: checksum
args:
Expand All @@ -40,7 +44,11 @@ signs:
- "${signature}"
- "--detach-sign"
- "${artifact}"

snapshot:
name_template: "{{ .Tag }}-next"
changelog:
skip: true

# GitHub release and release notes are created by the release-please action, so
# we only need to upload the artifacts.
release:
mode: keep-existing