Skip to content

Commit

Permalink
🌱 Fix goreleaser permission and flags
Browse files Browse the repository at this point in the history
Fixes goreleaser flags issue and sets specific permission for
goreleaser.
  • Loading branch information
naveensrinivasan committed Oct 26, 2021
1 parent 1b88587 commit fd238d0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
-
name: Checkout
Expand Down
37 changes: 27 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ before:
hooks:
- go mod download
builds:
flags:
# trimpath is for reproducible builds
# remove all file system paths from the resulting executable.
# Instead of absolute file system paths, the recorded file names
# will begin with either "go" (for the standard library),
# or a module path@version (when using modules),
# or a plain import path (when using GOPATH).
- -trimpath
- -tags=netgo

- id: linux
binary: scorecard-linux-{{ .Arch }}
no_unique_dist_dir: true
flags:
# trimpath is for reproducible builds
# remove all file system paths from the resulting executable.
# Instead of absolute file system paths, the recorded file names
# will begin with either "go" (for the standard library),
# or a module path@version (when using modules),
# or a plain import path (when using GOPATH).
- -trimpath
- -tags=netgo
goos:
- linux
goarch:
Expand All @@ -33,6 +32,15 @@ flags:
- id: darwin
binary: scorecard-darwin-{{ .Arch }}
no_unique_dist_dir: true
flags:
# trimpath is for reproducible builds
# remove all file system paths from the resulting executable.
# Instead of absolute file system paths, the recorded file names
# will begin with either "go" (for the standard library),
# or a module path@version (when using modules),
# or a plain import path (when using GOPATH).
- -trimpath
- -tags=netgo
goos:
- darwin
goarch:
Expand All @@ -44,6 +52,15 @@ flags:
- id: windows
binary: scorecard-windows-{{ .Arch }}
no_unique_dist_dir: true
flags:
# trimpath is for reproducible builds
# remove all file system paths from the resulting executable.
# Instead of absolute file system paths, the recorded file names
# will begin with either "go" (for the standard library),
# or a module path@version (when using modules),
# or a plain import path (when using GOPATH).
- -trimpath
- -tags=netgo
goos:
- windows
goarch:
Expand Down

0 comments on commit fd238d0

Please sign in to comment.