-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.06 KB
/
Copy pathrelease.yml
File metadata and controls
79 lines (67 loc) · 2.06 KB
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
71
72
73
74
75
76
77
78
79
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
windows:
runs-on: windows-latest
env:
VERSION: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: go build -o golt.exe -ldflags "-X main.version=${{ env.VERSION }}" ./cmd/golt
- name: Install Inno Setup
shell: pwsh
run: choco install innosetup -y
- name: Build installer
shell: pwsh
run: |
iscc installer.iss
- name: Generate SHA256SUMS
shell: pwsh
run: |
$files = @()
$files += "golt.exe"
if (Test-Path "Output") {
$files += Get-ChildItem -File -Path "Output" -Filter "*.exe" | ForEach-Object { "Output/$($_.Name)" }
}
$out = @()
foreach ($f in $files) {
$hash = (Get-FileHash -Algorithm SHA256 $f).Hash.ToLower()
$out += "$hash $f"
}
$out | Out-File -FilePath "SHA256SUMS" -Encoding ascii
- name: Install minisign
run: go install aead.dev/minisign/cmd/minisign@latest
- name: Sign SHA256SUMS
shell: pwsh
run: |
$keyPath = Join-Path $env:RUNNER_TEMP "minisign.key"
[IO.File]::WriteAllBytes($keyPath, [Convert]::FromBase64String("${{ secrets.AZTEKODE_MINISIGN_KEY_B64 }}"))
minisign -Sm SHA256SUMS -s $keyPath -W -t "repo=Aztekode/golt version=${{ env.VERSION }}"
- uses: actions/upload-artifact@v4
with:
name: windows-artifacts
path: |
golt.exe
Output/*.exe
SHA256SUMS
SHA256SUMS.minisig
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
generate_release_notes: true
overwrite_files: true
files: |
golt.exe
Output/*.exe
SHA256SUMS
SHA256SUMS.minisig