Skip to content

Commit

Permalink
Merge pull request #538 from yihuang/release/v2-croeseid
Browse files Browse the repository at this point in the history
Problem: goreleaser doesn't release binaries for testnet
  • Loading branch information
yihuang authored May 10, 2021
2 parents ad14629 + 2b42e74 commit b95a257
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 70 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,3 @@ jobs:
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
run: make release

goreleasermacm1:
runs-on: macos-latest
environment: release
env:
RA_TARGET: aarch64-apple-darwin
SELECT_XCODE: /Applications/Xcode_12.2.app

steps:
- name: Select XCode version
run: sudo xcode-select -s "${SELECT_XCODE}"
- uses: actions/checkout@v2
with:
submodules: true
- name: display sdk
run: SDKROOT=$(xcrun -sdk macosx11.0 --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.0 --show-sdk-platform-version) && echo $SDKROOT . " , " . $MACOSX_DEPLOYMENT_TARGET
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.16.4'
- name: release dry run
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: -f ./.goreleasermac.yml --rm-dist --skip-validate --skip-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: setup release environment
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release -f ./.goreleasermac.yml --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 20 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,22 @@ builds:
goarch:
- amd64
flags:
- -tags=cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
- -tags=testnet,cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain -X github.com/cosmos/cosmos-sdk/version.ServerName=chain-maind -X github.com/cosmos/cosmos-sdk/version.ClientName=chain-maincli -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "chain-maind-darwin-arm64"
main: ./cmd/chain-maind
binary: bin/chain-maind
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
goos:
- darwin
goarch:
- arm64
flags:
- -tags=testnet,cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain -X github.com/cosmos/cosmos-sdk/version.ServerName=chain-maind -X github.com/cosmos/cosmos-sdk/version.ClientName=chain-maincli -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "chain-maind-linux"
Expand All @@ -30,7 +45,7 @@ builds:
goarch:
- amd64
flags:
- -tags=cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
- -tags=testnet,cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain -X github.com/cosmos/cosmos-sdk/version.ServerName=chain-maind -X github.com/cosmos/cosmos-sdk/version.ClientName=chain-maincli -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "chain-maind-linux-arm64"
Expand All @@ -45,7 +60,7 @@ builds:
goarch:
- arm64
flags:
- -tags=cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
- -tags=testnet,cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain -X github.com/cosmos/cosmos-sdk/version.ServerName=chain-maind -X github.com/cosmos/cosmos-sdk/version.ClientName=chain-maincli -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "chain-maind-windows"
Expand All @@ -60,7 +75,7 @@ builds:
goarch:
- amd64
flags:
- -tags=cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
- -tags=testnet,cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu
- -buildmode=exe
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain -X github.com/cosmos/cosmos-sdk/version.ServerName=chain-maind -X github.com/cosmos/cosmos-sdk/version.ClientName=chain-maincli -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
Expand All @@ -77,6 +92,7 @@ archives:
format: zip
builds:
- chain-maind-darwin
- chain-maind-darwin-arm64
- chain-maind-windows
- chain-maind-linux
- chain-maind-linux-arm64
Expand Down
31 changes: 0 additions & 31 deletions .goreleasermac.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PACKAGES=$(shell go list ./... | grep -v '/simulation')
PACKAGE_NAME:=github.com/crypto-org-chain/chain-main
GOLANG_CROSS_VERSION = v1.16.4
GOLANG_CROSS_VERSION = v1.16.3


VERSION := $(shell echo $(shell git describe --tags 2>/dev/null ) | sed 's/^v//')
Expand Down

0 comments on commit b95a257

Please sign in to comment.