👷 use GitHub Actions to build client

This commit is contained in:
JustSong
2022-07-28 23:38:53 +08:00
parent 52e3465a30
commit 090bbcc61b
+30
View File
@@ -0,0 +1,30 @@
name: Build Client
on:
push:
tags:
- '*'
jobs:
release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
- name: Build
run: |
cd client
go mod download
go build -ldflags "-s -w -extldflags '-static'" -o message-receiver.exe
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
client/message-receiver.exe
client/starter.vbs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}