-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.34 KB
/
checksum_builder-windows.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
name: Checksum builder Windows
on:
push:
# branches:
# - main
tags:
- '*'
jobs:
build:
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT || github.token }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
check-latest: true
- name: compile
run: go build checksum.go
- name: Test
run: |
touch file
echo 1 >> file
.\checksum.exe -s sha256 -f file
.\checksum.exe -s sha256 -f checksum.exe > checksum.exe.sha256
Compress-Archive -LiteralPath '.\checksum.exe', 'checksum.exe.sha256' -DestinationPath 'checksum-win.zip'
.\checksum.exe -s sha256 -f 'checksum-win.zip' > checksum-win.zip.sha256
- name: Upload to checksum binary to github
uses: actions/upload-artifact@v3
with:
name: checksum_win
path: |
checksum-win.zip
checksum-win.zip.sha256
- name: Upload Release Asset
id: upload-windows-binary
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
with:
files: |
checksum-win.zip
checksum-win.zip.sha256