From 2732b945c3e9997ebc5ab001abfd4de926317320 Mon Sep 17 00:00:00 2001 From: Tarak Ben Youssef Date: Tue, 12 Dec 2023 17:39:57 -0600 Subject: [PATCH] add tmp-build without windows --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e96e4d97..5222e79a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,3 +46,43 @@ jobs: with: version: v1.52.2 args: --timeout=3m + + tmp-build: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64 + goos: [ linux, darwin ] + goarch: [ amd64, arm64 ] + exclude: + - goarch: arm64 + goos: windows + steps: + - uses: actions/checkout@v3 + - name: Codebase security check + continue-on-error: true + uses: snyk/actions/golang@master + with: + go-version: '1.20' + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + - uses: wangyoucao577/go-release-action@v1.41 + env: + MIXPANEL_PROJECT_TOKEN: ${{ secrets.MIXPANEL_PROJECT_TOKEN }} + LILICO_TOKEN: ${{ secrets.LILICO_TOKEN }} + APP_VERSION: $(basename ${GITHUB_REF}) + BUILD_TIME: $(date --iso-8601=seconds) + VERSION: ${{github.ref_name}} + COMMIT: ${{ github.sha }} + CGO_CFLAGS: "-O -D__BLST_PORTABLE__" # temporary workaround for crypto being built on older machines + with: + pre_command: make versioned-binaries + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: "1.20" + project_path: "./cmd/flow" + build_command: CGO_CFLAGS="-O -D__BLST_PORTABLE__" go build + ldflags: -X "github.com/onflow/flow-cli/build.commit=${{ env.COMMIT }}" -X "github.com/onflow/flow-cli/build.semver=${{ env.VERSION }}" -X "github.com/onflow/flow-cli/internal/command.mixpanelToken=${{ env.MIXPANEL_PROJECT_TOKEN }}" -X "github.com/onflow/flow-cli/internal/accounts.accountToken=${{ env.LILICO_TOKEN }}"