-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Antonio Navarro Perez <[email protected]>
- Loading branch information
1 parent
b1191bc
commit 0ed921a
Showing
4 changed files
with
129 additions
and
39 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,88 @@ | ||
project_name: tx-indexer | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- main: ./cmd | ||
binary: tx-indexer | ||
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/gnolang/tx-indexer:latest" | ||
- "ghcr.io/gnolang/tx-indexer:{{ .Tag }}" | ||
dockerfile: Dockerfile.release | ||
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/gnolang/tx-indexer:{{ .Tag }} | ||
For example: | ||
``` | ||
docker pull ghcr.io/gnolang/tx-indexer:{{ .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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Go Releaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
permissions: | ||
contents: write # needed to write releases | ||
id-token: write # needed for keyless signing | ||
packages: write # needed for ghcr access | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21 | ||
cache: true | ||
|
||
- uses: sigstore/[email protected] | ||
- uses: anchore/sbom-action/[email protected] | ||
|
||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
version: latest | ||
args: release --clean --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