Skip to content

Commit 171a3f3

Browse files
committed
ci(release): simplify matrix build
1 parent fc4fe0b commit 171a3f3

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@ jobs:
4040
needs: test
4141
strategy:
4242
matrix:
43-
goosarch:
44-
- 'darwin/arm64'
45-
- 'darwin/amd64'
46-
- 'linux/arm64'
47-
- 'linux/amd64'
48-
- 'windows/amd64'
49-
# etc
43+
os: [ 'darwin', 'linux', 'windows' ]
44+
arch: [ 'amd64', 'arm64' ]
5045
steps:
5146
- name: Checkout code
5247
uses: actions/checkout@v4
@@ -55,9 +50,8 @@ jobs:
5550
go-version: '1.22'
5651
- name: Build binary
5752
run: |
58-
GOOSARCH=${{matrix.goosarch}}
59-
GOOS=${GOOSARCH%/*}
60-
GOARCH=${GOOSARCH#*/}
53+
GOOS=${{ matrix.os }}
54+
GOARCH=${{ matrix.arch }}
6155
BINARY_NAME=cwc-$GOOS-$GOARCH
6256
if [ "$GOOS" = "windows" ]; then
6357
BINARY_NAME="$BINARY_NAME".exe
@@ -88,6 +82,6 @@ jobs:
8882
uses: softprops/action-gh-release@v1
8983
with:
9084
body_path: ".github/RELEASE-TEMPLATE.md"
91-
draft: false
85+
draft: true
9286
files: "**/cwc-*"
9387
token: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)