Skip to content

Commit

Permalink
chore: release ci issue
Browse files Browse the repository at this point in the history
  • Loading branch information
soring323 committed Sep 14, 2023
1 parent 7e3560c commit 783ff99
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
sudo rm -rf dist
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GHCR_TOKEN }}
240 changes: 165 additions & 75 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,108 +1,198 @@
before:
hooks:
- go mod download

project_name: sided
env:
- CGO_ENABLED=1
builds:
- id: "sidechaind-darwin"
main: ./cmd/sidechaind
binary: bin/sidechaind
- id: sided-darwin-amd64
main: ./cmd/sided/main.go
binary: sided
hooks:
pre:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
- CGO_LDFLAGS=-L/lib
goos:
- darwin
goarch:
- amd64
flags:
- -tags=cgo
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=sidechain -X github.com/cosmos/cosmos-sdk/version.AppName=sidechaind -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "sidechaind-darwin-arm64"
main: ./cmd/sidechaind
binary: bin/sidechaind
- -X github.com/cosmos/cosmos-sdk/version.Name=elys
- -X github.com/cosmos/cosmos-sdk/version.AppName=sided
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm
- -w -s
- -linkmode=external
tags:
- netgo
- ledger
- static_wasm
- id: sided-darwin-arm64
main: ./cmd/sided/main.go
binary: sided
hooks:
pre:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
- CGO_LDFLAGS=-L/lib
goos:
- darwin
goarch:
- arm64
flags:
- -tags=cgo
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=sidechain -X github.com/cosmos/cosmos-sdk/version.AppName=sidechaind -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "sidechaind-linux"
main: ./cmd/sidechaind
binary: bin/sidechaind
env:
- CGO_ENABLED=1
- CC=gcc
- CXX=g++
- -X github.com/cosmos/cosmos-sdk/version.Name=elys
- -X github.com/cosmos/cosmos-sdk/version.AppName=sided
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm
- -w -s
- -linkmode=external
tags:
- netgo
- ledger
- static_wasm
- id: sided-linux-amd64
main: ./cmd/sided
binary: sided
hooks:
pre:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a
goos:
- linux
goarch:
- amd64
env:
- CC=x86_64-linux-gnu-gcc
flags:
- -tags=cgo
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=sidechain -X github.com/cosmos/cosmos-sdk/version.AppName=sidechaind -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "sidechaind-linux-arm64"
main: ./cmd/sidechaind
binary: bin/sidechaind
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- -X github.com/cosmos/cosmos-sdk/version.Name=elys
- -X github.com/cosmos/cosmos-sdk/version.AppName=sided
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
tags:
- netgo
- ledger
- muslc
- osusergo
- id: sided-linux-arm64
main: ./cmd/sided
binary: sided
hooks:
pre:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/lib/aarch64-linux-gnu/libwasmvm_muslc.a
goos:
- linux
goarch:
- arm64
flags:
- -tags=cgo
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=sidechain -X github.com/cosmos/cosmos-sdk/version.AppName=sidechaind -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "sidechaind-windows"
main: ./cmd/sidechaind
binary: bin/sidechaind
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
goos:
- windows
goarch:
- amd64
- CC=aarch64-linux-gnu-gcc
flags:
- -tags=cgo
- -buildmode=exe
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=sidechain -X github.com/cosmos/cosmos-sdk/version.AppName=sidechaind -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}

- -X github.com/cosmos/cosmos-sdk/version.Name=elys
- -X github.com/cosmos/cosmos-sdk/version.AppName=sided
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
tags:
- netgo
- ledger
- muslc
- osusergo
universal_binaries:
- id: sided-darwin-universal
ids:
- sided-darwin-amd64
- sided-darwin-arm64
replace: false
archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
format_overrides:
- goos: windows
format: zip
builds:
- sidechaind-darwin
- sidechaind-darwin-arm64
- sidechaind-windows
- sidechaind-linux
- sidechaind-linux-arm64

- id: zipped
builds:
- sided-darwin-universal
- sided-linux-amd64
- sided-linux-arm64
- sided-darwin-amd64
- sided-darwin-arm64
name_template: "{{.ProjectName}}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
format: tar.gz
files:
- none*
- id: binaries
builds:
- sided-darwin-universal
- sided-linux-amd64
- sided-linux-arm64
- sided-darwin-amd64
- sided-darwin-arm64
name_template: "{{.ProjectName}}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
format: binary
files:
- none*
checksum:
name_template: 'checksums.txt'
name_template: "sha256sum.txt"
algorithm: sha256
# Docs: https://goreleaser.com/customization/changelog/
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
snapshot:
name_template: "{{ .Tag }}-next"
skip: true
# Docs: https://goreleaser.com/customization/release/
release:
github:
owner: sideprotocol
name: sideprotocol
replace_existing_draft: true
header: |
## Description
< DESCRIPTION OF RELEASE >
## ⚡️ Binaries
Binaries for Linux and Darwin (amd64 and arm64) are available below.
Darwin users can also use the same universal binary `sided-v{{ .Version }}-darwin-all` for both amd64 and arm64.
#### 🔨 Build from source
If you prefer to build from source, you can use the following commands:
````bash
git clone https://github.com/sideprotocol/side
cd elys && git checkout v{{ .Version }}
make install
````
## What's Changed
See the full changelog [here](https://github.com/sideprotocol/side/blob/v{{ .Version }}/CHANGELOG.md)
name_template: "v{{.Version}}"
mode: replace
draft: true
# Docs: https://goreleaser.com/customization/announce/
# We could automatically announce the release in
# - discord
# - slack
# - twitter
# - webhooks
# - telegram
# - reddit
#
# announce:
# discord:
# enabled: true
# message_template: 'New {{.Tag}} is out!'
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,8 @@ localnet-show-logstream:
### Releasing ###
###############################################################################

PACKAGE_NAME:=github.com/sideprotocol/sidechain
GOLANG_CROSS_VERSION = v1.19
PACKAGE_NAME:=github.com/sideprotocol/side
GOLANG_CROSS_VERSION = v1.20
GOPATH ?= '$(HOME)/go'
release-dry-run:
docker run \
Expand Down

0 comments on commit 783ff99

Please sign in to comment.