-
Notifications
You must be signed in to change notification settings - Fork 63
47 lines (44 loc) · 1.45 KB
/
release-cli.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This workflow will build bkpaas-cli and restore
name: release-cli
on:
release:
types:
- created
jobs:
release-cli:
runs-on: ubuntu-latest
if: github.event.release && contains(github.event.release.tag_name, 'bkpaas-cli')
strategy:
matrix:
include:
- goarch: arm64
goos: darwin
bin_name: bkpaas-cli
- goarch: amd64
goos: darwin
bin_name: bkpaas-cli
- goarch: amd64
goos: linux
bin_name: bkpaas-cli
- goarch: arm64
goos: linux
bin_name: bkpaas-cli
- goarch: amd64
goos: windows
bin_name: bkpaas-cli.exe
steps:
- name: checkout code
uses: actions/checkout@v3
- name: release go binaries
uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.REPO_RELEASE_ACCESS_TOKEN }}
goversion: "1.20"
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: bkpaas-cli
build_command: make build GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} VERSION=${{ github.event.release.tag_name }}
extra_files: LICENSE.txt bkpaas-cli/README.md bkpaas-cli/${{ matrix.bin_name }}
# tag_name 需要以 bkpaas-cli 为前缀
asset_name: ${{ github.event.release.tag_name }}-${{ matrix.goos }}-${{ matrix.goarch }}
md5sum: false