-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.39 KB
/
build_and_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
name: Build & Release
on:
workflow_dispatch:
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
path: "src"
- name: "Build for Windows"
run: |
cd src
GOOS=windows GOARCH=amd64 go build -o combo-gen-windows-amd64.exe
- name: "Build for Linux"
run: |
cd src
go build -o combo-gen-linux-amd64
- name: "Upload Artifacts"
uses: actions/upload-artifact@v2
with:
name: combo-gen-artifacts
path: |
src/combo-gen-windows-amd64.exe
src/combo-gen-linux-amd64
release:
needs: build-and-release
runs-on: ubuntu-latest
steps:
- name: "Download Artifacts"
uses: actions/download-artifact@v2
with:
name: combo-gen-artifacts
path: src
- name: "Rename Artifacts"
run: |
mv src/combo-gen-windows-amd64.exe src/combo-gen-windows.exe
mv src/combo-gen-linux-amd64 src/combo-gen-linux
- name: "Make Release"
uses: softprops/action-gh-release@v1
with:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
generate_release_notes: true
files: |
src/combo-gen-windows.exe
src/combo-gen-linux