From 4de791ceb7549cb1a878a9fdd9a1061513c084d6 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Wed, 21 Feb 2024 15:46:32 -0800 Subject: [PATCH] update --- .github/workflows/build-release.yaml | 9 +++++---- .goreleaser.yaml | 13 ++++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index a689e4ced..5e3c91b90 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -17,9 +17,10 @@ jobs: go-version: '1.20' env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - - name: setup dependencies - uses: actions/setup-go@v2 - - name: setup release environment + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - name: Setup Release Environment run: |- echo 'MIXPANEL_PROJECT_TOKEN=${{ secrets.MIXPANEL_PROJECT_TOKEN }}' > .release-env echo 'LILICO_TOKEN=${{ secrets.LILICO_TOKEN }}' >> .release-env @@ -29,5 +30,5 @@ jobs: echo 'COMMIT=${{ github.sha }}' >> .release-env echo 'CGO_FLAGS="-O2 -D__BLST_PORTABLE__"' >> .release-env echo 'GITHUB_TOKEN=${{ secrets.FLOW_CLI_RELEASE }}' >> .release-env - - name: release publish + - name: Build and Release run: make release \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f6111262e..f2cb61875 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,6 +1,7 @@ before: hooks: - make generate + - export LD_FLAGS="-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 }}" builds: - id: darwin-amd64 @@ -15,7 +16,7 @@ builds: flags: - -mod=readonly 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 }} + - {{ .Env.LD_FLAGS }} - id: darwin-arm64 main: ./cmd/flow @@ -29,7 +30,7 @@ builds: flags: - -mod=readonly 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 }} + - {{ .Env.LD_FLAGS }} - id: linux-amd64 main: ./cmd/flow @@ -43,7 +44,7 @@ builds: flags: - -mod=readonly 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 }} + - {{ .Env.LD_FLAGS }} - id: linux-arm64 main: ./cmd/flow @@ -57,7 +58,7 @@ builds: flags: - -mod=readonly 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 }} + - {{ .Env.LD_FLAGS }} archives: - id: golang-cross @@ -68,8 +69,10 @@ archives: - linux-arm64 name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" format: tar.gz + wrap_in_directory: false checksum: - disable: true + name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}.md5" + algorithm: md5 snapshot: name_template: "{{ .Tag }}" changelog: