-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.41 KB
/
release.yaml
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
name: Go Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
- name: Check out code
uses: actions/checkout@v2
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Create and push tag
run: |
git tag "${{ github.event.inputs.version }}"
git push origin "${{ github.event.inputs.version }}"
- name: Build for Windows
run: |
GOOS=windows GOARCH=amd64 go build -o aski_windows_amd64.exe
- name: Build for ARM64 macOS
run: |
GOOS=darwin GOARCH=arm64 go build -o aski_darwin_arm64
- name: Build for AMD64 macOS
run: |
GOOS=darwin GOARCH=amd64 go build -o aski_darwin_amd64
- name: Build for Linux
run: |
GOOS=linux GOARCH=amd64 go build -o aski_linux_amd64
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.event.inputs.version }}
tag_name: ${{ github.event.inputs.version }}
files: |
aski_windows_amd64.exe
aski_darwin_arm64
aski_darwin_amd64
aski_linux_amd64