-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: build release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Build | ||
run: | | ||
GOOS=linux GOARCH=amd64 go build -o busuanzi-sync-linux-amd64-${{ github.ref_name }} | ||
GOOS=linux GOARCH=arm64 go build -o busuanzi-sync-linux-arm64-${{ github.ref_name }} | ||
GOOS=darwin GOARCH=amd64 go build -o busuanzi-sync-darwin-amd64-${{ github.ref_name }} | ||
GOOS=darwin GOARCH=arm64 go build -o busuanzi-sync-darwin-arm64-${{ github.ref_name }} | ||
GOOS=windows GOARCH=amd64 go build -o busuanzi-sync-windows-amd64-${{ github.ref_name }}.exe | ||
GOOS=windows GOARCH=arm64 go build -o busuanzi-sync-windows-arm64-${{ github.ref_name }}.exe | ||
GOOS=windows GOARCH=386 go build -o busuanzi-sync-windows-386-${{ github.ref_name }}.exe | ||
- name: Archive | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
busuanzi-sync-linux-amd64-${{ github.ref_name }} | ||
busuanzi-sync-linux-arm64-${{ github.ref_name }} | ||
busuanzi-sync-darwin-amd64-${{ github.ref_name }} | ||
busuanzi-sync-darwin-arm64-${{ github.ref_name }} | ||
busuanzi-sync-windows-amd64-${{ github.ref_name }}.exe | ||
busuanzi-sync-windows-arm64-${{ github.ref_name }}.exe | ||
busuanzi-sync-windows-386-${{ github.ref_name }}.exe | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
release_name: ${{ github.ref_name }} | ||
tag_name: ${{ github.ref_name }} | ||
body: ${{ github.event.release.body }} | ||
draft: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
## 使用方法 | ||
|
||
1. 按照提示填写 .env 文件 | ||
1. 按照提示填写 .env.exmaple 文件 并重命名为 .env | ||
2. 运行脚本 `go build && ./busuanzi-sync` | ||
|
||
|
||
|