From 22bfa540fe35f4cec2f5c95792720ec8429fb34c Mon Sep 17 00:00:00 2001 From: Cam Otts Date: Mon, 30 Jan 2023 10:42:22 -0600 Subject: [PATCH] added arm7 builds --- .github/workflows/release.yml | 43 ++++++++++++++++++++++++++++++++++- .goreleaser-linux-arm.yml | 15 ++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .goreleaser-linux-arm.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41760186..73dd6911 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,47 @@ jobs: name: release-builds path: ./dist/*.gz + build-linux-arm: + runs-on: ubuntu-20.04 + steps: + - run: sudo apt-get install gcc-arm-linux-gnueabi + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - run: git fetch --force --tags + + - uses: actions/setup-go@v3 + with: + go-version: '>=1.19.3' + cache: true + + - uses: actions/setup-node@v3 + with: + node-version: 16.x + + - run: npm install + working-directory: ui + + - run: npm run build + working-directory: ui + env: + CI: "" + + - uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --skip-publish --config .goreleaser-linux-arm.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/upload-artifact@v3 + with: + name: release-builds + path: ./dist/*.gz + build-darwin: runs-on: macos-latest steps: @@ -140,7 +181,7 @@ jobs: path: ./dist/*.gz publish-release: - needs: [build-linux, build-darwin, build-windows] + needs: [build-linux, build-linux-arm, build-darwin, build-windows] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.goreleaser-linux-arm.yml b/.goreleaser-linux-arm.yml new file mode 100644 index 00000000..c35696d0 --- /dev/null +++ b/.goreleaser-linux-arm.yml @@ -0,0 +1,15 @@ +builds: +- id: zrok-armv7 + main: ./cmd/zrok + binary: zrok + ldflags: "-s -w -X github.com/openziti/zrok/build.Version={{.Tag}} -X github.com/openziti/zrok/build.Hash={{.ShortCommit}}" + env: + - CC=arm-linux-gnueabi-gcc + - CGO_ENABLED=1 + - CC_FOR_TARGET=gcc-arm-linux-gnueabi + goos: + - linux + goarch: + - arm + goarm: + - 7 \ No newline at end of file