-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sapcc-bot
committed
Oct 11, 2023
1 parent
c7dd0c3
commit 0192ac7
Showing
3 changed files
with
83 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
################################################################################ | ||
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> # | ||
# Edit Makefile.maker.yaml instead. # | ||
################################################################################ | ||
|
||
name: goreleaser | ||
"on": | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
permissions: | ||
contents: read | ||
packages: write | ||
jobs: | ||
release: | ||
name: goreleaser | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
check-latest: true | ||
go-version: "1.21" | ||
- name: Generate release info | ||
run: | | ||
go install github.com/sapcc/go-bits/tools/release-info@latest | ||
release-info CHANGELOG.md $(shell git describe --tags --abbrev=0) > build/release-info | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
args: release --clean --release-notes=./build/release-info | ||
version: latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -s -w | ||
- -X github.com/sapcc/go-api-declarations/bininfo.binName=absent-metrics-operator | ||
- -X github.com/sapcc/go-api-declarations/bininfo.version={{ .Version }} | ||
- -X github.com/sapcc/go-api-declarations/bininfo.commit={{ .FullCommit }} | ||
- -X github.com/sapcc/go-api-declarations/bininfo.buildDate={{ .CommitDate }} # use CommitDate instead of Date for reproducibility | ||
# Set the modified timestamp on the output binary to ensure that builds are reproducible. | ||
mod_timestamp: "{{ .CommitTimestamp }}" | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
|
||
archives: | ||
- name_template: '{{ .ProjectName }}-{{ replace .Version "v" "" }}-{{ .Os }}-{{ .Arch }}' | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- CHANGELOG.md | ||
- LICENSE | ||
- README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters