Skip to content

Commit

Permalink
ci: rework release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyxdd committed Apr 2, 2024
1 parent ab28fc2 commit af14adf
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,25 @@ jobs:
matrix:
goos: [linux]
goarch: ["386", amd64, arm64]

steps:
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Build
env:
GOOS: ${{ matrix.goos }}
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:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://go.dev/dl/go1.22.0.linux-amd64.tar.gz"
binary_name: "OpenGFW"
extra_files: LICENSE README.md README.zh.md
files: build/*

0 comments on commit af14adf

Please sign in to comment.