-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 913 Bytes
/
release.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
name: Build and Release Windows Executable
on:
release:
types:
- created
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.5' # Use the Go version compatible with your project
- name: Build Windows executable
run: |
go mod tidy
go build -o wingologrotate.exe
- name: Archive executable
run: Compress-Archive -Path wingologrotate.exe -DestinationPath wingologrotate.zip
- name: Upload to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RLEASE_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./wingologrotate.zip
asset_name: wingologrotate.zip
asset_content_type: application/zip