-
Notifications
You must be signed in to change notification settings - Fork 3
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
4 changed files
with
85 additions
and
2 deletions.
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,71 @@ | ||
name: Release Go Binary for Linux (Multi-arch) | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
TZ: Asia/Shanghai | ||
|
||
permissions: | ||
contents: write | ||
discussions: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
# 定义要构建的 CPU 架构 | ||
goarch: | ||
[ | ||
386, | ||
amd64, | ||
arm, | ||
arm64, | ||
loong64, | ||
mips, | ||
mipsle, | ||
mips64, | ||
mips64le, | ||
ppc64, | ||
ppc64le, | ||
riscv64, | ||
s390x, | ||
] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.23" | ||
|
||
- name: Build | ||
# refs/heads/main or refs/tags/v1.0.0 | ||
# main or v1.0.0 | ||
env: | ||
GOOS: linux | ||
GOARCH: ${{ matrix.goarch }} | ||
VERSION: ${{ github.ref_name }} | ||
run: | | ||
make build | ||
- name: tar dir | ||
run: | | ||
mkdir uaProxy-linux-${{ matrix.goarch }} | ||
mv uaProxy uaProxy-linux-${{ matrix.goarch }}/ | ||
cp config.yaml uaProxy-linux-${{ matrix.goarch }}/ | ||
tar -czvf uaProxy-linux-${{ matrix.goarch }}.tar.gz uaProxy-linux-${{ matrix.goarch }} | ||
- name: Create Release and Upload Release Asset | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
# tag_name: ${{ github.ref_name }} | ||
name: ${{ github.ref_name }} | ||
body_path: Release.md | ||
files: | | ||
uaProxy-linux-${{ matrix.goarch }}.tar.gz |
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
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
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,7 @@ | ||
### changes | ||
|
||
第一版发布, 基本功能完成, 已经在寝室开始用2天了. | ||
|
||
```sh | ||
tar -xzvf uaProxy-linux-xxxxxxx.tar.gz # 解压 | ||
``` |