Remove SLSA Go releaser workflow and add GoReleaser configuration

lemon-mint committed Nov 19, 2025 at 22:56 UTC 2b9c6acd7da71034c676199c450614936bde4d02
4 files changed +81 -38
.github/workflows/go-ossf-slsa3-publish.yml deleted
-38
@@ -1,38 +0,0 @@
1 -# This workflow uses actions that are not certified by GitHub.
2 -# They are provided by a third-party and are governed by
3 -# separate terms of service, privacy policy, and support
4 -# documentation.
5 -
6 -# This workflow lets you compile your Go project using a SLSA3 compliant builder.
7 -# This workflow will generate a so-called "provenance" file describing the steps
8 -# that were performed to generate the final binary.
9 -# The project is an initiative of the OpenSSF (openssf.org) and is developed at
10 -# https://github.com/slsa-framework/slsa-github-generator.
11 -# The provenance file can be verified using https://github.com/slsa-framework/slsa-verifier.
12 -# For more information about SLSA and how it improves the supply-chain, visit slsa.dev.
13 -
14 -name: SLSA Go releaser
15 -on:
16 - workflow_dispatch:
17 - release:
18 - types: [created]
19 -
20 -permissions: read-all
21 -
22 -jobs:
23 - # ========================================================================================================================================
24 - # Prerequesite: Create a .slsa-goreleaser.yml in the root directory of your project.
25 - # See format in https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/go/README.md#configuration-file
26 - #=========================================================================================================================================
27 - build:
28 - permissions:
29 - id-token: write # To sign.
30 - contents: write # To upload release assets.
31 - actions: read # To read workflow path.
32 - uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0
33 - with:
34 - go-version: 1.25
35 - # =============================================================================================================
36 - # Optional: For more options, see https://github.com/slsa-framework/slsa-github-generator#golang-projects
37 - # =============================================================================================================
38 -
.github/workflows/release.yml new
+35
@@ -0,0 +1,35 @@
1 +name: Release
2 +
3 +on:
4 + push:
5 + tags:
6 + - "*"
7 +
8 +permissions:
9 + contents: write
10 + packages: write
11 + issues: write
12 + id-token: write
13 +
14 +jobs:
15 + goreleaser:
16 + runs-on: ubuntu-latest
17 + steps:
18 + - name: Checkout
19 + uses: actions/checkout@v5
20 +
21 + - name: Set up Go
22 + uses: actions/setup-go@v6
23 + with:
24 + go-version: "stable"
25 + check-latest: true
26 +
27 + - name: Run GoReleaser
28 + uses: goreleaser/goreleaser-action@v6
29 + with:
30 + distribution: goreleaser
31 + # 'latest', 'nightly', or a semver
32 + version: "~> v2"
33 + args: release --clean
34 + env:
35 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
.gitignore
+3
@@ -38,3 +38,6 @@ profile.cov
38 # Docker Compose Override
39 docker-compose.override.yml
40 docker-compose.override.yaml
41 +
42 +# Added by goreleaser init:
43 +dist/
.goreleaser.yaml new
+43
@@ -0,0 +1,43 @@
1 +version: 2
2 +
3 +before:
4 + hooks:
5 + - apt-get update
6 + - apt-get install -y --no-install-recommends nodejs npm brotli make binaryen
7 + - make build
8 +
9 +builds:
10 + - main: ./cmd/relay-server
11 + env:
12 + - CGO_ENABLED=0
13 + goos:
14 + - linux
15 + - windows
16 + - darwin
17 +
18 +archives:
19 + - formats: [tar.gz]
20 + # this name template makes the OS and Arch compatible with the results of `uname`.
21 + name_template: >-
22 + {{ .ProjectName }}_
23 + {{- title .Os }}_
24 + {{- if eq .Arch "amd64" }}x86_64
25 + {{- else if eq .Arch "386" }}i386
26 + {{- else }}{{ .Arch }}{{ end }}
27 + {{- if .Arm }}v{{ .Arm }}{{ end }}
28 + # use zip for windows archives
29 + format_overrides:
30 + - goos: windows
31 + formats: [zip]
32 +
33 +changelog:
34 + sort: asc
35 + filters:
36 + exclude:
37 + - "^docs:"
38 + - "^test:"
39 +
40 +release:
41 + footer: >-
42 +
43 + ---