-
Notifications
You must be signed in to change notification settings - Fork 134
98 lines (96 loc) · 3.22 KB
/
release.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: release
on:
push:
tags:
- "v[0-9]+.*"
jobs:
build_release:
name: build_release
runs-on: ubuntu-latest
steps:
- name: checkout and setup
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: update Golang
uses: actions/setup-go@v2
with:
go-version: '1.17.2'
- name: build binary files
run: make binary
- name: list directory
run: ls -la && ls -la bin
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload darwin_amd64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/darwin_amd64
asset_name: darwin_amd64
asset_content_type: application/octet-stream
- name: upload darwin_arm64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/darwin_arm64
asset_name: darwin_arm64
asset_content_type: application/octet-stream
- name: upload linux_amd64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/linux_amd64
asset_name: linux_amd64
asset_content_type: application/octet-stream
- name: upload linux_arm64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/linux_arm64
asset_name: linux_arm64
asset_content_type: application/octet-stream
- name: upload linux_386 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/linux_386
asset_name: linux_386
asset_content_type: application/octet-stream
- name: upload windows_386 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/windows_386.exe
asset_name: windows_386.exe
asset_content_type: application/octet-stream
- name: upload windows_amd64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/windows_amd64.exe
asset_name: windows_amd64.exe
asset_content_type: application/octet-stream