Skip to content

Commit

Permalink
goreleaser linux
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-sirotin committed May 13, 2024
1 parent 295e042 commit 1a0b26c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# linux:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: '1.20'
#
# - name: Run GoReleaser
# uses: goreleaser/goreleaser-action@v5
# with:
# distribution: goreleaser
# args: build --clean --config=.goreleaser-linux.yml
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
args: build --clean --config=.goreleaser-linux.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# windows:
# runs-on: windows-latest
1 change: 0 additions & 1 deletion .goreleaser-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ before:

builds:
- goos:
# - linux
# - windows
- darwin
goarch:
Expand Down
25 changes: 25 additions & 0 deletions .goreleaser-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 1

before:
hooks:
# - go mod tidy

builds:
- goos:
- linux
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=1

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}

0 comments on commit 1a0b26c

Please sign in to comment.