Skip to content

Commit c53185d

Browse files
committed
.github/workflows: add Windows job
Updates #48
1 parent 76fa96f commit c53185d

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ on:
1919
release:
2020
types: [published]
2121
jobs:
22-
release:
23-
name: Release
22+
unix:
23+
name: Unix
2424
runs-on: ${{ matrix.os }}
2525
strategy:
2626
matrix:
@@ -50,3 +50,37 @@ jobs:
5050
asset_path: ./${{ steps.package.outputs.file }}
5151
asset_name: ${{ steps.package.outputs.file }}
5252
asset_content_type: application/gzip
53+
windows:
54+
name: Windows
55+
runs-on: windows-latest
56+
steps:
57+
- name: Set up Go
58+
uses: actions/setup-go@v1
59+
with:
60+
go-version: 1.14
61+
- name: Check out code
62+
uses: actions/checkout@v1
63+
- name: Download dependencies
64+
run: go mod download
65+
env:
66+
GO111MODULE: on
67+
- name: Build executable
68+
run: |-
69+
release\build.ps1 `
70+
-version ($Env:GITHUB_REF).trimstart('refs/tags/') `
71+
-out release\msi\gg.exe
72+
env:
73+
GO111MODULE: on
74+
- name: Package release
75+
run: .\release.ps1
76+
working-directory: .\release\msi
77+
id: package
78+
- name: Upload binary
79+
uses: actions/upload-release-asset@v1
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
with:
83+
upload_url: ${{ github.event.release.upload_url }}
84+
asset_path: .\release\msi\${{ steps.package.outputs.file }}
85+
asset_name: ${{ steps.package.outputs.file }}
86+
asset_content_type: application/gzip

0 commit comments

Comments
 (0)