-
Notifications
You must be signed in to change notification settings - Fork 3
ci: build release binaries with goreleaser #55
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
Merged
+83
−0
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9ac493a
ci: build release binaries with goreleaser
khvn26 46d2640
ci: attest release archives
khvn26 ea25e8d
ci: mark beta releases as Latest
khvn26 cae365b
ci: never touch the notes release-please wrote
khvn26 ab10f29
fix: stop snapshot builds claiming to be a release
khvn26 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,41 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: ["v*"] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| goreleaser: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write # upload release artifacts | ||
| id-token: write # attest artifacts | ||
| attestations: write | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3 | ||
| with: | ||
| version: "~> v2" | ||
|
Zaimwa9 marked this conversation as resolved.
|
||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| # Attests every file listed in the checksum file. | ||
| - uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4.2.1 | ||
| with: | ||
| subject-checksums: ./dist/checksums.txt | ||
|
|
||
| # During public beta the newest beta is what people | ||
| # should land on, so clear it. | ||
| - if: contains(github.ref_name, '-beta') | ||
| run: gh release edit "$GITHUB_REF_NAME" --prerelease=false --latest | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or 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,42 @@ | ||
| version: 2 | ||
|
|
||
| builds: | ||
| - binary: flagsmith | ||
| env: | ||
| - CGO_ENABLED=0 | ||
| flags: | ||
| - -trimpath | ||
| ldflags: | ||
| - >- | ||
| -s -w -X github.com/Flagsmith/flagsmith-cli/internal/version.Version={{ if .IsSnapshot }}v{{ .Version }}{{ else }}{{ .Tag }}{{ end }} | ||
| mod_timestamp: "{{ .CommitTimestamp }}" | ||
| goos: | ||
| - linux | ||
| - darwin | ||
| - windows | ||
| goarch: | ||
| - amd64 | ||
| - arm64 | ||
|
|
||
| archives: | ||
| - name_template: "flagsmith_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
| formats: | ||
| - tar.gz | ||
| format_overrides: | ||
| - goos: windows | ||
| formats: | ||
| - zip | ||
| files: | ||
| - LICENSE | ||
| - README.md | ||
|
|
||
| checksum: | ||
| name_template: checksums.txt | ||
|
|
||
| # changelog handled by release-please. | ||
| changelog: | ||
| disable: true | ||
|
|
||
| release: | ||
| mode: keep-existing | ||
| prerelease: auto | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.