McFish鱼竿独立计算合成,修复钓鱼概率异常,qqwife删除群老婆重复文本,wife添加抽老婆下载失败时使用本地文件. #3740
This file contains hidden or 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
| name: 最新版 | |
| on: [push, pull_request] | |
| env: | |
| BINARY_PREFIX: "zbp_" | |
| BINARY_SUFFIX: "" | |
| PR_PROMPT: "::warning:: Build artifact will not be uploaded due to the workflow is trigged by pull request." | |
| LD_FLAGS: "-w -s" | |
| jobs: | |
| build: | |
| name: Build binary CI | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/amd64, darwin/arm64 | |
| goos: [linux, windows] | |
| goarch: ["386", amd64, arm, arm64] | |
| exclude: | |
| - goos: windows | |
| goarch: arm | |
| - goos: windows | |
| goarch: arm64 | |
| - goos: windows | |
| goarch: 386 | |
| fail-fast: true | |
| steps: | |
| - uses: actions/checkout@master | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go environment | |
| uses: actions/setup-go@master | |
| with: | |
| go-version: '1.25' | |
| - name: Cache downloaded module | |
| uses: actions/cache@master | |
| continue-on-error: true | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ matrix.goos }}-${{ matrix.goarch }}-${{ hashFiles('**/go.sum') }} | |
| - name: Build binary file | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| IS_PR: ${{ !!github.head_ref }} | |
| run: | | |
| GOOS= GOARCH= go generate ./... | |
| if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi | |
| if $IS_PR ; then echo $PR_PROMPT; fi | |
| export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX" | |
| export CGO_ENABLED=0 | |
| go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@master | |
| if: ${{ !github.head_ref }} | |
| with: | |
| name: ${{ matrix.goos }}_${{ matrix.goarch }} | |
| path: output/ |