alpine js #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/release.yaml | |
on: | |
push: # 每次 push 的时候触发 | |
workflow_dispatch: | |
name: Build Release | |
jobs: | |
release: | |
if: startsWith(github.ref, 'refs/tags/') # 只有这次 Commit 是 创建 Tag 时,才进行后续发布操作 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
# - name: Install dependencies | |
# run: | | |
# go version | |
# go get -u github.com/BapiGso/SMOE | |
- name: Build | |
run: | | |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o SMOE_linux_amd64 | |
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o SMOE_linux_arm64 | |
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o SMOE_linux_arm | |
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o SMOE_windows_amd64.exe | |
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -o SMOE_windows_arm64.exe | |
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o SMOE_mac_amd64 | |
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o SMOE_mac_arm64 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: # 将下述可执行文件 release 上去 | |
files: | | |
SMOE_windows_amd64.exe | |
SMOE_windows_arm64.exe | |
SMOE_linux_amd64 | |
SMOE_linux_arm64 | |
SMOE_linux_arm | |
SMOE_mac_amd64 | |
SMOE_mac_arm64 |