Skip to content

Commit fc5f816

Browse files
authored
add dgctl release script (#1485)
* add dgctl release script
1 parent 0cf3e19 commit fc5f816

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/dgctl_release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release cli multi architecture
2+
on:
3+
release:
4+
branches:
5+
- 'go'
6+
types: [released]
7+
jobs:
8+
binary:
9+
strategy:
10+
matrix:
11+
arch: [arm, arm64, amd64, 386]
12+
os: [linux, darwin, freebsd, windows]
13+
exclude:
14+
- os: darwin
15+
arch: arm
16+
- os: darwin
17+
arch: 386
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Download Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: 1.21.1
26+
id: go
27+
28+
- name: Check out repository
29+
uses: actions/checkout@v4
30+
- name: Build
31+
run: |
32+
env GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} CGO_ENABLED=0 go build -o dgctl ./dgctl/main.go
33+
34+
- name: Publish linux-x64 exec to github
35+
id: upload-release-asset-linux-x64
36+
uses: actions/upload-release-asset@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
upload_url: ${{ github.event.release.upload_url }}
41+
asset_path: 'dgctl'
42+
asset_name: dgctl-${{matrix.os}}-${{matrix.arch}}
43+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)