mirror of
https://github.com/apernet/OpenGFW.git
synced 2024-11-15 06:49:24 +08:00
Merge pull request #118 from apernet/ci-release
ci: rework release workflow
This commit is contained in:
commit
980d59ed2e
26
.github/workflows/release.yaml
vendored
26
.github/workflows/release.yaml
vendored
@ -15,13 +15,25 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
goos: [linux]
|
goos: [linux]
|
||||||
goarch: ["386", amd64, arm64]
|
goarch: ["386", amd64, arm64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: wangyoucao577/go-release-action@v1
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
go-version: "1.22"
|
||||||
goos: ${{ matrix.goos }}
|
|
||||||
goarch: ${{ matrix.goarch }}
|
- name: Build
|
||||||
goversion: "https://go.dev/dl/go1.22.0.linux-amd64.tar.gz"
|
env:
|
||||||
binary_name: "OpenGFW"
|
GOOS: ${{ matrix.goos }}
|
||||||
extra_files: LICENSE README.md README.zh.md
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
run: |
|
||||||
|
mkdir -p build
|
||||||
|
go build -o build/OpenGFW-${GOOS}-${GOARCH} -ldflags "-s -w" .
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: build/*
|
||||||
|
Loading…
Reference in New Issue
Block a user