From b4d721240d9557743b285749bc098d0b60724768 Mon Sep 17 00:00:00 2001 From: Francois Date: Wed, 3 Apr 2024 08:52:28 +0200 Subject: [PATCH] workflows --- .github/workflows/go.yml | 4 ++-- .github/workflows/release.yml | 2 +- .goreleaser.yaml | 32 ++++++++++++++++++++++++++++---- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index dfd1ed3..1ee9d2a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.21 - name: Test run: go test -v ./... @@ -28,7 +28,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.21 - name: Build run: go build -v ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 714c638..28bfbc1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.21 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 3edefa6..bdbf468 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,10 +1,34 @@ +project_name: gocoop + +env: + - GO111MODULE=on + - CGO_ENABLED=0 + +before: + hooks: + - go mod tidy + - go mod download + builds: - - id: "gocoop" - binary: gocoop + - id: linux-arm + binary: gocoop-linux-{{ .Arch }} + main: ./main.go goos: - - freebsd - - windows + - linux goarch: - amd64 + ldflags: + - "{{ .Env.LDFLAGS }}" + no_unique_dist_dir: true + + - id: linux-arm64 + binary: gocoop-linux-{{ .Arch }} + main: ./main.go + goos: + - linux + goarch: - arm - arm64 + ldflags: + - "{{ .Env.LDFLAGS }}" + no_unique_dist_dir: true \ No newline at end of file