-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat add initial goreleaser config (#20)
- Loading branch information
1 parent
a261bef
commit e3ad98e
Showing
7 changed files
with
140 additions
and
43 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,86 @@ | ||
project_name: faucet | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- binary: faucet | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
|
||
gomod: | ||
proxy: true | ||
|
||
archives: | ||
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
|
||
signs: | ||
- cmd: cosign | ||
env: | ||
- COSIGN_EXPERIMENTAL=1 | ||
certificate: '${artifact}.pem' | ||
args: | ||
- sign-blob | ||
- '--output-certificate=${certificate}' | ||
- '--output-signature=${signature}' | ||
- '${artifact}' | ||
- "--yes" # needed on cosign 2.0.0+ | ||
artifacts: checksum | ||
output: true | ||
|
||
dockers: | ||
- image_templates: | ||
- "ghcr.io/${{ github.repository }}:{{ .Tag }}" | ||
dockerfile: Dockerfile | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.name={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- "--label=org.opencontainers.image.source={{.GitURL}}" | ||
|
||
docker_signs: | ||
- cmd: cosign | ||
env: | ||
- COSIGN_EXPERIMENTAL=1 | ||
artifacts: images | ||
output: true | ||
args: | ||
- 'sign' | ||
- '${artifact}' | ||
- "--yes" # needed on cosign 2.0.0+ | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
changelog: | ||
sort: asc | ||
|
||
source: | ||
enabled: true | ||
|
||
sboms: | ||
- artifacts: archive | ||
- id: source # Two different sbom configurations need two different IDs | ||
artifacts: source | ||
|
||
release: | ||
draft: true | ||
replace_existing_draft: true | ||
prerelease: true | ||
footer: | | ||
### Container Images | ||
https://ghcr.io/${{ github.repository }}:{{ .Tag }} | ||
For example: | ||
``` | ||
docker pull ghcr.io/${{ github.repository }}:{{ .Tag }} | ||
``` | ||
This file was deleted.
Oops, something went wrong.
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
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,34 @@ | ||
name: Go Releaser | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "v*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
|
||
- name: Install GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
install-only: true | ||
|
||
- name: Release | ||
run: | | ||
goreleaser release --config ./.github/.goreleaser.yaml | ||
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
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
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