mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-21 07:10:07 +08:00
⚡️ 升级go到1.17
This commit is contained in:
parent
59c6fe593a
commit
9f0d93bca2
52
.github/workflows/latest.yml
vendored
52
.github/workflows/latest.yml
vendored
@ -1,52 +0,0 @@
|
|||||||
name: 最新版
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
my-job:
|
|
||||||
name: Build ZeroBot-Plugin on Push 🚀
|
|
||||||
runs-on: ubuntu-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:
|
|
||||||
# A list of files, directories, and wildcard patterns to cache and restore
|
|
||||||
path: ~/go/pkg/mod
|
|
||||||
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
|
|
||||||
|
|
||||||
- name: Tidy Go modules
|
|
||||||
run: go mod tidy
|
|
||||||
|
|
||||||
- name: Build linux-x64
|
|
||||||
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x64
|
|
||||||
- name: Build linux-x86
|
|
||||||
run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x86
|
|
||||||
- name: Build windows-x64
|
|
||||||
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe
|
|
||||||
- name: Build windows-x86
|
|
||||||
run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe
|
|
||||||
- name: Build arm64
|
|
||||||
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-arm64
|
|
||||||
- name: Build armv6
|
|
||||||
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6
|
|
||||||
|
|
||||||
- name: Upload Build Artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: zerobot-plugin-all.zip
|
|
||||||
path: ./artifacts/zerobot-plugin-*
|
|
||||||
2
.github/workflows/prerelease.yml
vendored
2
.github/workflows/prerelease.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.17
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.17
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user