Skip to content

Commit 7475588

Browse files
committed
ci: update release workflow for multi-arch builds
1 parent 61938dc commit 7475588

File tree

2 files changed

+35
-15
lines changed

2 files changed

+35
-15
lines changed

.github/workflows/goreleaser.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
builds:
2+
- env:
3+
- CGO_ENABLED=0
4+
goos:
5+
- linux
6+
- darwin
7+
- windows
8+
goarch:
9+
- amd64
10+
- arm64
11+
ignore:
12+
- goos: windows
13+
goarch: arm64
14+
15+
archives:
16+
- format: tar.gz
17+
format_overrides:
18+
- goos: windows
19+
format: zip
20+
21+
checksum:
22+
name_template: 'checksums.txt'

.github/workflows/release.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@ on:
44
tags: [ "v*" ]
55

66
jobs:
7-
build:
7+
release:
88
runs-on: ubuntu-latest
9-
strategy:
10-
matrix:
11-
include:
12-
- os: linux arch: amd64
13-
- os: linux arch: arm64
14-
- os: darwin arch: amd64
15-
- os: darwin arch: arm64
16-
- os: windows arch: amd64
179
steps:
1810
- uses: actions/checkout@v4
19-
- uses: wangyoucao577/go-release-action@v1
11+
12+
- name: Setup Go
13+
uses: actions/setup-go@v4
14+
with:
15+
go-version: '1.21'
16+
17+
- name: Run GoReleaser
18+
uses: goreleaser/goreleaser-action@v5
2019
with:
21-
goos: ${{ matrix.os }}
22-
goarch: ${{ matrix.arch }}
23-
project_path: "."
24-
binary_name: "gitc"
25-
extra_files: LICENSE README.md
20+
version: latest
21+
args: release --clean
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)