Skip to content

Update release.yml

Update release.yml #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true
- name: Initialize Go Module
run: |
cd backend
go mod init github.com/${{ github.repository }}/backend
go mod tidy
- name: Build
run: |
cd backend
go build -v -ldflags="-s -w -H=windowsgui" -trimpath -o app.exe
- name: Create ZIP
run: |
Compress-Archive -Path backend/app.exe, backend/static/* -DestinationPath release.zip
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: release.zip
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true