-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add SLSA goreleaser config for darwin-arm64 (#125)
Signed-off-by: hirokuni-kitahara <[email protected]>
- Loading branch information
1 parent
be1f99b
commit e35f818
Showing
2 changed files
with
48 additions
and
0 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 |
---|---|---|
|
@@ -56,6 +56,18 @@ jobs: | |
go-version: 1.21 | ||
evaluated-envs: "COMMIT_DATE:${{needs.args.outputs.commit-date}}, COMMIT:${{needs.args.outputs.commit}}, VERSION:${{needs.args.outputs.version}}, TREE_STATE:${{needs.args.outputs.tree-state}}, VERSION_PKG:${{needs.args.outputs.version-package}}" | ||
|
||
build-darwin-arm64: | ||
permissions: | ||
id-token: write # To sign the provenance. | ||
contents: write # To upload assets to release. | ||
actions: read # To read the workflow path. | ||
needs: args | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | ||
with: | ||
config-file: .slsa-goreleaser-darwin-arm64.yml | ||
go-version: 1.21 | ||
evaluated-envs: "COMMIT_DATE:${{needs.args.outputs.commit-date}}, COMMIT:${{needs.args.outputs.commit}}, VERSION:${{needs.args.outputs.version}}, TREE_STATE:${{needs.args.outputs.tree-state}}, VERSION_PKG:${{needs.args.outputs.version-package}}" | ||
|
||
build-windows-amd64: | ||
permissions: | ||
id-token: write # To sign the provenance. | ||
|
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,36 @@ | ||
# Version for this file. | ||
version: 1 | ||
|
||
# (Optional) List of env variables used during compilation. | ||
env: | ||
- GO111MODULE=on | ||
- CGO_ENABLED=0 | ||
|
||
# (Optional) Flags for the compiler. | ||
flags: | ||
- -trimpath | ||
- -tags=netgo | ||
|
||
# The OS to compile for. `GOOS` env variable will be set to this value. | ||
goos: darwin | ||
|
||
# The architecture to compile for. `GOARCH` env variable will be set to this value. | ||
goarch: arm64 | ||
|
||
# (Optional) Entrypoint to compile. | ||
main: ./cmd/kubectl-sigstore | ||
|
||
# (Optional) Working directory. (default: root of the project) | ||
# dir: ./relative/path/to/dir | ||
|
||
# Binary output name. | ||
# {{ .Os }} will be replaced by goos field in the config file. | ||
# {{ .Arch }} will be replaced by goarch field in the config file. | ||
binary: kubectl-sigstore-darwin-arm64 | ||
|
||
# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow. | ||
ldflags: | ||
- "-X '{{ .Env.VERSION_PKG }}.GitVersion={{ .Env.VERSION }}'" | ||
- "-X '{{ .Env.VERSION_PKG }}.gitCommit={{ .Env.COMMIT }}'" | ||
- "-X '{{ .Env.VERSION_PKG }}.buildDate={{ .Env.COMMIT_DATE }}'" | ||
- "-X '{{ .Env.VERSION_PKG }}.gitTreeState={{ .Env.TREE_STATE }}'" |