-
Notifications
You must be signed in to change notification settings - Fork 68
47 lines (45 loc) · 1.46 KB
/
main.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
name: Build All
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '>=1.21.0'
- run: go version
- name: Windows Build
run: |
$Env:GOOS='windows'
go build -o GoReSym.exe
Compress-Archive -DestinationPath GoReSym-windows.zip -LiteralPath ./GoReSym.exe -CompressionLevel Fastest
Remove-Item ./GoReSym.exe
- name: Linux Build
run: |
$Env:GOOS='linux'
go build -o GoReSym
Compress-Archive -DestinationPath GoReSym-linux.zip -LiteralPath ./GoReSym -CompressionLevel Fastest
Remove-Item ./GoReSym
- name: Mac Build
run: |
$Env:GOOS='darwin'
go build -o GoReSym
Compress-Archive -DestinationPath GoReSym-mac.zip -LiteralPath ./GoReSym -CompressionLevel Fastest
Remove-Item ./GoReSym
- name: Release Windows
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: GoReSym-windows.zip
- name: Release Linux
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: GoReSym-linux.zip
- name: Release Mac
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: GoReSym-mac.zip