diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e43aea9b..25fe73c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,8 @@ name: Release on: push: branches: [main] - paths: - - "share/const.go" + # paths: + # - "share/const.go" jobs: release: @@ -13,6 +13,13 @@ jobs: matrix: go: [1.17] steps: + - name: arm env + run: | + apt-get update + apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc + apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi + apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf + - name: Setup Cache uses: actions/cache@v2 with: diff --git a/Makefile b/Makefile index bfba4c2b..3f596f89 100644 --- a/Makefile +++ b/Makefile @@ -267,6 +267,8 @@ artifacts: clean # 制品 mkdir -p dist CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=linux GOARCH=amd64 go build -v -o dist/yao-${VERSION}-linux-amd64 + CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 go build -v -o dist/yao-${VERSION}-linux-arm + mkdir -p dist/release mv dist/yao-*-* dist/release/ chmod +x dist/release/yao-*-*