Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rf: package name to use own repository #224

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ name: "Release"
on:
push:
tags:
- '*' # Run release on any tag. Will be marked as draft by default anyway.
- 'v*.*.*' # stable
- 'v*.*.rc*' # release candidate

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.19

Expand All @@ -25,10 +26,9 @@ jobs:
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash

- run: echo https://github.com/icon-project/ibc-relay/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md
- run: echo https://github.com/icon-project/ibc-relay/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md

- name: setup release environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make release
51 changes: 42 additions & 9 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,55 @@
project_name: ibc-relay
project_name: relayer
env:
- CGO_ENABLED=1
builds:
- id: darwin-amd64
main: ./main.go
binary: rly
hooks:
pre:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.LIBWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a
goos:
- darwin
goarch:
- amd64
env:
- CC=o64-clang
- CXX=o64-clang++
- CGO_LDFLAGS=-L/lib
flags:
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X github.com/cosmos/relayer/v2/cmd.Version={{ .Tag }}
- -s -w -X github.com/icon-project/relayer/v2/cmd.Version={{ .Tag }}
- -linkmode=external
tags:
- static_wasm
- id: darwin-arm64
main: ./main.go
binary: rly
hooks:
pre:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.LIBWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a
goos:
- darwin
goarch:
- arm64
env:
- CC=oa64-clang
- CXX=oa64-clang++
- CGO_LDFLAGS=-L/lib
flags:
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X github.com/cosmos/relayer/v2/cmd.Version={{ .Tag }}
- -s -w -X github.com/icon-project/relayer/v2/cmd.Version={{ .Tag }}
- -linkmode=external
tags:
- static_wasm
- id: linux-amd64
main: ./main.go
binary: rly
hooks:
pre:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.LIBWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a
goos:
- linux
goarch:
Expand All @@ -40,22 +59,36 @@ builds:
- CXX=x86_64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X github.com/cosmos/relayer/v2/cmd.Version={{ .Tag }}
- -s -w -X github.com/icon-project/relayer/v2/cmd.Version={{ .Tag }}
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -lm'
tags:
- muslc
- netgo
- id: linux-arm64
main: ./main.go
binary: rly
hooks:
pre:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.LIBWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/lib/aarch64-linux-gnu/libwasmvm_muslc.a
goos:
- linux
goarch:
- arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X github.com/cosmos/relayer/v2/cmd.Version={{ .Tag }}
- -s -w -X github.com/icon-project/relayer/v2/cmd.Version={{ .Tag }}
- -linkmode=external
- -extldflags "-static"
tags:
- muslc
- netgo

archives:
- id: golang-cross
Expand All @@ -74,4 +107,4 @@ checksum:

release:
prerelease: auto
draft: true
draft: false
20 changes: 9 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ AKASH_VERSION := v0.16.3
OSMOSIS_VERSION := v8.0.0
WASMD_VERSION := v0.25.0
DOCKER := $(shell which docker)
LIBWASM_VERSION ?= v2.0.1

GOPATH := $(shell go env GOPATH)
GOBIN := $(GOPATH)/bin
Expand All @@ -16,9 +17,9 @@ all: lint install
# Build / Install
###############################################################################

ldflags = -X github.com/cosmos/relayer/v2/cmd.Version=$(VERSION) \
-X github.com/cosmos/relayer/v2/cmd.Commit=$(COMMIT) \
-X github.com/cosmos/relayer/v2/cmd.Dirty=$(DIRTY)
ldflags = -X github.com/icon-project/relayer/v2/cmd.Version=$(VERSION) \
-X github.com/icon-project/relayer/v2/cmd.Commit=$(COMMIT) \
-X github.com/icon-project/relayer/v2/cmd.Dirty=$(DIRTY)

ldflags += $(LDFLAGS)
ldflags := $(strip $(ldflags))
Expand Down Expand Up @@ -115,7 +116,7 @@ build-gaia:

.PHONY: two-chains test test-integration interchaintest install build lint coverage clean

PACKAGE_NAME := github.com/cosmos/relayer
PACKAGE_NAME := github.com/icon-project/relayer/v2
GOLANG_CROSS_VERSION ?= v1.19.4

SYSROOT_DIR ?= sysroots
Expand All @@ -133,7 +134,8 @@ sysroot-unpack:
release-dry-run:
@docker run \
--rm \
-e CGO_ENABLED=1 \
--env GITHUB_TOKEN \
--env LIBWASM_VERSION=$(LIBWASM_VERSION) \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v `pwd`/sysroot:/sysroot \
Expand All @@ -143,14 +145,10 @@ release-dry-run:

.PHONY: release
release:
@if [ ! -f ".release-env" ]; then \
echo "\033[91m.release-env is required for release\033[0m";\
exit 1;\
fi
docker run \
--rm \
-e CGO_ENABLED=1 \
--env-file .release-env \
--env GITHUB_TOKEN \
--env LIBWASM_VERSION=$(LIBWASM_VERSION) \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v `pwd`/sysroot:/sysroot \
Expand Down
Loading
Loading