-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
1 parent
c5f5217
commit 0231208
Showing
1 changed file
with
62 additions
and
0 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,62 @@ | ||
name: debug | ||
|
||
on: | ||
push: | ||
branches: | ||
- debug | ||
|
||
jobs: | ||
releases-matrix: | ||
name: Release Go Binary | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# build and publish in parallel: linux/386, linux/amd64, darwin/386, darwin/amd64 | ||
goos: [freebsd] | ||
goarch: [amd64] | ||
exclude: | ||
- goarch: 386 | ||
goos: darwin | ||
- goarch: arm | ||
goos: darwin | ||
- goarch: arm64 | ||
goos: darwin | ||
goarm: | ||
- 7 | ||
steps: | ||
# get the source code | ||
- uses: actions/checkout@v4 | ||
|
||
# set environment | ||
- name: Set APP_VERSION env | ||
run: echo "APP_VERSION=$(echo ${GITHUB_REF} | rev | cut -d'/' -f 1 | rev )" >> $GITHUB_ENV | ||
- name: Set BUILD_TIME env | ||
run: echo "BUILD_TIME=$(date)" >> $GITHUB_ENV | ||
- name: Environment Printer | ||
uses: managedkaos/print-env@v1.0 | ||
|
||
# setup node | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
# prepare assets | ||
- name: Prepare assets | ||
run: | | ||
chmod +x ./prepare_assets.sh | ||
./prepare_assets.sh | ||
# build and make the releases | ||
- name: Build and make the releases | ||
uses: wangyoucao577/go-release-action@master | ||
with: | ||
github_token: "xxx" | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: "https://dl.google.com/go/go1.21.5.linux-amd64.tar.gz" | ||
pre_command: export CGO_ENABLED=0 | ||
binary_name: "wireguard-ui" | ||
build_flags: -v | ||
ldflags: -X "main.appVersion=${{ env.APP_VERSION }}" -X "main.buildTime=${{ env.BUILD_TIME }}" -X main.gitCommit=${{ github.sha }} -X main.gitRef=${{ github.ref }} |