mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
42 lines
891 B
YAML
42 lines
891 B
YAML
name: Compile ZeroBot-Plugin-windows
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
jobs:
|
|
my-job:
|
|
name: Build ZeroBot-Plugin-windows 🚀
|
|
runs-on: windows-latest
|
|
steps:
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.16
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache Go
|
|
id: cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
|
|
|
|
- name: Tidy Go modules
|
|
run: go mod tidy
|
|
|
|
- name: Build
|
|
run: go build -ldflags="-s -w" -o artifacts/ZeroBot-Plugin-windows.exe
|
|
|
|
- name: Upload Build Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ZeroBot-Plugin-windows.exe
|
|
path: ./artifacts
|