-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (57 loc) · 1.56 KB
/
windows_64.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
name: Build for Windows 64-bit
on:
push:
branches: [master]
jobs:
check:
runs-on: ubuntu-latest
outputs:
status: ${{ steps.check.outputs.status }}
upload_url: ${{ steps.create.outputs.upload_url }}
steps:
- name: create-release
id: create
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly-${{ github.sha }}
release_name: Nightly build ${{ github.sha }}
prerelease: true
commitish: ${{ github.sha }}
build:
needs: check
if: needs.check.outputs.status == 0
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
name: checkout
- name: setup-go
uses: actions/setup-go@v2
with:
go-version: '^1.12'
- name: setup-bin-folder
run: mkdir bin
- name: setup-deps
run: |
go get github.com/kardianos/[email protected]
go get github.com/mitchellh/[email protected]
- name: build-for-windows
run: |
go build ohsw.go
dir ohsw.exe
env:
GOOS: windows
GOARCH: amd64
- name: copy-to-bin-folder
run: copy ohsw.exe bin
- name: Upload Windows Build
id: upload-win
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.check.outputs.upload_url }}
asset_path: bin/ohsw.exe
asset_name: ohsw.exe
asset_content_type: application/octet-stream