Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |