Skip to content

Commit

Permalink
Merge pull request #333 from redhatrises/fix_go_release
Browse files Browse the repository at this point in the history
fix: go workflow release
  • Loading branch information
redhatrises committed Apr 18, 2023
2 parents 32683ca + 20defd2 commit 624a4b7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
-
name: Run GoReleaser
go-version: "1.20"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
specs/swagger*.json

dist/
30 changes: 17 additions & 13 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,13 @@ builds:
- arm64

archives:
- replacements:
darwin: macOS
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else if eq .Arch "darwin" }}macOS
{{- else }}{{ .Arch }}{{ end }}
checksum:
name_template: 'checksums.txt'
Expand All @@ -261,14 +262,17 @@ changelog:
nfpms:
- id: falcon_sensor_download
package_name: gofalcon-utils
maintainer: simon.lukasik@crowdstrike.com
maintainer: integrations@crowdstrike.com

file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Release }}.{{ .Arch }}"
replacements:
386: i686
amd64: x86_64
arm: aarch32
arm64: aarch64
file_name_template: >-
{{ .ProjectName }}-
{{ .Version }}-
{{ .Release }}.
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i686
{{- else if eq .Arch "arm" }}aarch32
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end }}
formats:
- deb
Expand Down

0 comments on commit 624a4b7

Please sign in to comment.