-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.4 KB
/
go.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
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: download libraries
run: |
choco install --limit-output --no-progress wkhtmltopdf
New-Item -ItemType Junction -Path "C:\wkhtmltopdf" -Target "C:\Program Files\wkhtmltopdf"
- name: Build
run: |
Set-Item -Path Env:CGO_LDFLAGS -Value "-LC:\wkhtmltopdf\bin"
Set-Item -Path Env:CGO_CFLAGS -Value "-IC:\wkhtmltopdf\include"
go get
go build
$compress = @{
Path = "wizo-schedule.exe", "C:\wkhtmltopdf\bin\wkhtmltox.dll"
CompressionLevel = "Fastest"
DestinationPath = "wizo-schedule.zip"
}
Compress-Archive @compress
- name: Bump version and push tag
if: ${{ github.ref == 'refs/heads/main' }}
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: ncipollo/release-action@v1
if: ${{ github.ref == 'refs/heads/main' }}
with:
artifacts: "wizo-schedule.zip"
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
token: ${{ secrets.GITHUB_TOKEN }}