Skip to content

Commit fd238d0

Browse files
🌱 Fix goreleaser permission and flags
Fixes goreleaser flags issue and sets specific permission for goreleaser.
1 parent 1b88587 commit fd238d0

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

.github/workflows/goreleaser.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ on:
2222
jobs:
2323
goreleaser:
2424
runs-on: ubuntu-latest
25+
permissions:
26+
contents: write
2527
steps:
2628
-
2729
name: Checkout

.goreleaser.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ before:
77
hooks:
88
- go mod download
99
builds:
10-
flags:
11-
# trimpath is for reproducible builds
12-
# remove all file system paths from the resulting executable.
13-
# Instead of absolute file system paths, the recorded file names
14-
# will begin with either "go" (for the standard library),
15-
# or a module path@version (when using modules),
16-
# or a plain import path (when using GOPATH).
17-
- -trimpath
18-
- -tags=netgo
19-
2010
- id: linux
2111
binary: scorecard-linux-{{ .Arch }}
2212
no_unique_dist_dir: true
13+
flags:
14+
# trimpath is for reproducible builds
15+
# remove all file system paths from the resulting executable.
16+
# Instead of absolute file system paths, the recorded file names
17+
# will begin with either "go" (for the standard library),
18+
# or a module path@version (when using modules),
19+
# or a plain import path (when using GOPATH).
20+
- -trimpath
21+
- -tags=netgo
2322
goos:
2423
- linux
2524
goarch:
@@ -33,6 +32,15 @@ flags:
3332
- id: darwin
3433
binary: scorecard-darwin-{{ .Arch }}
3534
no_unique_dist_dir: true
35+
flags:
36+
# trimpath is for reproducible builds
37+
# remove all file system paths from the resulting executable.
38+
# Instead of absolute file system paths, the recorded file names
39+
# will begin with either "go" (for the standard library),
40+
# or a module path@version (when using modules),
41+
# or a plain import path (when using GOPATH).
42+
- -trimpath
43+
- -tags=netgo
3644
goos:
3745
- darwin
3846
goarch:
@@ -44,6 +52,15 @@ flags:
4452
- id: windows
4553
binary: scorecard-windows-{{ .Arch }}
4654
no_unique_dist_dir: true
55+
flags:
56+
# trimpath is for reproducible builds
57+
# remove all file system paths from the resulting executable.
58+
# Instead of absolute file system paths, the recorded file names
59+
# will begin with either "go" (for the standard library),
60+
# or a module path@version (when using modules),
61+
# or a plain import path (when using GOPATH).
62+
- -trimpath
63+
- -tags=netgo
4764
goos:
4865
- windows
4966
goarch:

0 commit comments

Comments
 (0)