66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25'
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install Wails CLI
|
|
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
|
|
|
|
- name: Install frontend dependencies
|
|
run: npm install
|
|
working-directory: frontend
|
|
|
|
- name: Build frontend
|
|
run: npm run generate
|
|
working-directory: frontend
|
|
|
|
- name: Generate bindings
|
|
run: wails3 generate bindings
|
|
|
|
- name: Generate syso
|
|
working-directory: build
|
|
run: wails3 generate syso -arch amd64 -icon windows/icon.ico -manifest windows/wails.exe.manifest -info windows/info.json -out ../wails_windows_amd64.syso
|
|
|
|
- name: Build
|
|
env:
|
|
CGO_ENABLED: 1
|
|
GOOS: windows
|
|
GOARCH: amd64
|
|
run: go build -tags production -trimpath -buildvcs=false -ldflags="-w -s -H windowsgui" -o bin/gitpilot.exe
|
|
|
|
- name: Copy config.yaml
|
|
run: Copy-Item config.yaml -Destination bin/config.yaml
|
|
|
|
- name: Remove syso
|
|
run: Remove-Item *.syso
|
|
|
|
- name: Package
|
|
run: Compress-Archive -Path "bin/gitpilot.exe","bin/config.yaml" -DestinationPath "bin/gitpilot-windows-amd64.zip" -Force
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
generate_release_notes: true
|
|
files: bin/gitpilot-windows-amd64.zip
|