Skip to content

Commit

Permalink
Merge pull request #635 from KiraCore/release/v0.3.42
Browse files Browse the repository at this point in the history
release/v0.3.42 -> master
  • Loading branch information
MrLutik authored Mar 3, 2024
2 parents 8efe686 + aa8fe52 commit 719d955
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 32 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/hook.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/merge_hook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

name: Release Merged Hook

on:
pull_request:
types: [closed]
branches:
- master

jobs:
trigger-dispatch:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v')
runs-on: ubuntu-latest
steps:
- name: Extract Version from Branch Name
id: version-extract
run: |
VERSION=$(echo "${{ github.event.pull_request.head.ref }}" | sed 's|release/v||')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Trigger Repository Dispatch Event
env:
VERSION: ${{ env.VERSION }}
run: |
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.REPO_ACCESS }}" \
"https://api.github.com/repos/KiraCore/sekin/dispatches" \
-d @- <<EOF
{
"event_type": "release_merged",
"client_payload": {
"version": "${VERSION}",
"authors": "KIRA",
"url": "https://kira.network",
"documentation": "https://docs.kira.network",
"source": "https://github.com/KiraCore/sekai",
"vendor": "KiraCore",
"licenses": "CC BY-NC-SA 4.0",
"title": "sekai",
"description": "SEKAI, KIRA's blockchain core, enhances Tendermint with Multi-Bonded Proof of Stake for staking diverse assets and KEX. It facilitates transactions and state transitions through Consensus Nodes, supported by off-chain modules like INTERX and RYOKAI for scalable execution and storage. As a hypermodular network hub, SEKAI streamlines user balance settlements, secures RollApp layers, and manages data/token transfers. It simplifies dApp deployment by enabling Consensus Nodes to act as Executors for RollApps, fostering a decentralized verification and execution system incentivized by KIRA’s liquidity protocols."
}
}
EOF
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DOCKER := $(shell which docker)

.PHONY: all install go.sum test test-local lint proto-gen proto-gen-local build start publish
.PHONY: all install go.sum test test-local lint proto-gen proto-gen-local build build-static start publish

all: install
install:
Expand Down Expand Up @@ -54,6 +54,9 @@ proto-check-breaking:
build:
./scripts/build.sh

build-static:
./scripts/sbuild.sh

start:
go run ./cmd/sekaid/main.go

Expand All @@ -66,4 +69,4 @@ network-start:
./scripts/test-local/network-start.sh

network-stop:
./scripts/test-local/network-stop.sh
./scripts/test-local/network-stop.sh
4 changes: 3 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Features:

- Add flag for filtering only required modules for migration #630
- Add webhook
- Add static build

31 changes: 31 additions & 0 deletions scripts/sbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -e
set -x
. /etc/profile

LOCAL_PLATFORM="$(uname)" && LOCAL_PLATFORM="$(echo "$LOCAL_PLATFORM" | tr '[:upper:]' '[:lower:]' )"
LOCAL_ARCH=$(([[ "$(uname -m)" == *"arm"* ]] || [[ "$(uname -m)" == *"aarch"* ]]) && echo "arm64" || echo "amd64")
LOCAL_OUT="${GOBIN}/sekaid"
PLATFORM="$1" && [ -z "$PLATFORM" ] && PLATFORM="$LOCAL_PLATFORM"
ARCH="$2" && [ -z "$ARCH" ] && ARCH="$LOCAL_ARCH"
OUTPUT="$3" && [ -z "$OUTPUT" ] && OUTPUT="$LOCAL_OUT"
VERSION=$(./scripts/version.sh)
COMMIT=$(git log -1 --format='%H')
ldfName="-X github.com/cosmos/cosmos-sdk/version.Name=sekai"
ldfAppName="-X github.com/cosmos/cosmos-sdk/version.AppName=sekaid"
ldfVersion="-X github.com/cosmos/cosmos-sdk/version.Version=$VERSION"
ldfCommit="-X github.com/cosmos/cosmos-sdk/version.Commit=$COMMIT"
ldfBuildTags="-X github.com/cosmos/cosmos-sdk/version.BuildTags=${PLATFORM},${ARCH}"
rm -fv "$OUTPUT" || echo "ERROR: Failed to wipe old sekaid binary"
go mod tidy
GO111MODULE=on go mod verify
# Buld staic binary
env CGO_ENABLED=0 GOOS=$PLATFORM GOARCH=$ARCH go build -ldflags "-extldflags '-static' ${ldfName} ${ldfAppName} ${ldfVersion} ${ldfCommit} ${ldfBuildTags}" -o "$OUTPUT" ./cmd/sekaid
( [ "$PLATFORM" == "$LOCAL_PLATFORM" ] && [ "$ARCH" == "$LOCAL_ARCH" ] && [ -f $OUTPUT ] ) && \
echo "INFO: Sucessfully built SEKAI $($OUTPUT version)" || echo "INFO: Sucessfully built SEKAI to '$OUTPUT'"
2 changes: 1 addition & 1 deletion types/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package types
const (
// we set page iteration limit for safety
PageIterationLimit = 512
SekaiVersion = "v0.3.41"
SekaiVersion = "v0.3.42"
CosmosVersion = "v0.47.6"
)

0 comments on commit 719d955

Please sign in to comment.