Skip to content

fix apk name.

fix apk name. #33

Workflow file for this run

name: Release for multiple platforms
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [386, amd64, arm64]
include:
- goos: linux
goarch: arm
goarm: 7
- goos: linux
goarch: mips
gomips: softfloat
- goos: linux
goarch: mipsle
gomips: softfloat
- goos: linux
goarch: mips64
- goos: linux
goarch: mips64le
exclude:
- goos: darwin
goarch: arm
- goos: darwin
goarch: 386
steps:
- uses: actions/checkout@v4
- name: Set APP_VERSION env
run: echo APP_VERSION=$(basename ${GITHUB_REF}) >> ${GITHUB_ENV}
- name: Set ldflags as environment variable
run: |
if [ ${{ matrix.goos }} == 'linux' ]&&[ ${{ matrix.goarch }} == 'amd64' ]; then
LD_FLAGS="-X main.Version=${{ env.APP_VERSION }} -linkmode 'external' -extldflags '-static'"
else
LD_FLAGS="-X main.Version=${{ env.APP_VERSION }}"
fi
echo "LD_FLAGS=$LD_FLAGS" >> ${GITHUB_ENV}
- uses: pdahd/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goarm: ${{ matrix.goarm }}
gomips: ${{ matrix.gomips }}
project_path: "."
binary_name: "CloudflareWarpSpeedTest"
goversion: "1.22"
ldflags: "${{ env.LD_FLAGS }}"