Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Feb 21, 2024
1 parent 5fe9167 commit 4de791c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
13 changes: 8 additions & 5 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 4de791c

Please sign in to comment.