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

release: draft release v0.0.2 #24

Merged
merged 7 commits into from
Jan 6, 2023
Merged
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
36 changes: 36 additions & 0 deletions .github/generate_change_log.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
checksum() {
echo $(sha256sum $@ | awk '{print $1}')
}
change_log_file="./CHANGELOG.md"
version="## $@"
version_prefix="## v"
start=0
CHANGE_LOG=""
while read line; do
if [[ $line == *"$version"* ]]; then
start=1
continue
fi
if [[ $line == *"$version_prefix"* ]] && [ $start == 1 ]; then
break;
fi
if [ $start == 1 ]; then
CHANGE_LOG+="$line\n"
fi
done < ${change_log_file}
LINUX_BIN_SUM="$(checksum ./linux/linux)"
MAC_BIN_SUM="$(checksum ./macos/macos)"
WINDOWS_BIN_SUM="$(checksum ./windows/windows.exe)"
OUTPUT=$(cat <<-END
${CHANGE_LOG}\n
## Assets\n
| Assets | Sha256 Checksum |\n
| :-----------: |------------|\n
| linux | ${LINUX_BIN_SUM} |\n
| mac | ${MAC_BIN_SUM} |\n
| windows | ${WINDOWS_BIN_SUM} |\n
END
)

echo -e ${OUTPUT}
8 changes: 4 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ jobs:
strategy:
matrix:
go-version: [1.18.x]
os: [ubuntu-18.04]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
GOPRIVATE: github.com/bnb-chain
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_SECRET }}
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
# In order:
# * Module download cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
go-version: [1.18.x]
os: [ubuntu-18.04]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
GOPRIVATE: github.com/bnb-chain
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup GitHub Token
run: git config --global url.https://[email protected]/.insteadOf https://github.com/
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
# In order:
# * Module download cache
Expand Down
155 changes: 113 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,128 @@
# This workflow is useful if you want to automate the process of:
#
# a) Creating a new prelease when you push a new tag with a "v" prefix (version).
#
# This type of prerelease is meant to be used for production: alpha, beta, rc, etc. types of releases.
# After the prerelease is created, you need to make your changes on the release page at the relevant
# Github page and publish your release.
#
# b) Creating/updating the "latest" prerelease when you push to your default branch.
#
# This type of prelease is useful to make your bleeding-edge binaries available to advanced users.
#
# The workflow will not run if there is no tag pushed with a "v" prefix and no change pushed to your
# default branch.
name: Release

on:
push:
# Publish `v1.2.3` tags as releases.
tags:
- v*

jobs:
might_release:
runs-on: ubuntu-latest
build:
name: Build Release
strategy:
matrix:
go-version: [1.18.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
fetch-depth: 0

- name: Prepare Release Variables
id: vars
uses: ignite/cli/actions/release/vars@develop

- name: Issue Release Assets
uses: ignite/cli/actions/cli@develop
if: ${{ steps.vars.outputs.should_release == 'true' }}
go-version: ${{ matrix.go-version }}

- uses: actions/cache@v3
with:
args: chain build --release --release.prefix ${{ steps.vars.outputs.tarball_prefix }} -t linux:amd64 -t darwin:amd64 -t darwin:arm64
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Setup GitHub Token
run: git config --global url.https://${{ secrets.GH_ACCESS_SECRET }}@github.com/.insteadOf https://github.com/

# ==============================
# Linux/Macos Build
# ==============================

- name: Delete the "latest" Release
uses: dev-drprasad/[email protected]
if: ${{ steps.vars.outputs.is_release_type_latest == 'true' }}
- name: Build Binary for ${{matrix.os}}
run: |
make build

# ==============================
# Upload artifacts
# ==============================

- name: Upload Linux Build
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
tag_name: ${{ steps.vars.outputs.tag_name }}
delete_release: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: linux
path: ./build/bin/bfsd

- name: Publish the Release
uses: softprops/action-gh-release@v1
if: ${{ steps.vars.outputs.should_release == 'true' }}
- name: Upload MacOS Build
uses: actions/upload-artifact@v3
if: matrix.os == 'macos-latest'
with:
tag_name: ${{ steps.vars.outputs.tag_name }}
files: release/*
prerelease: true
name: macos
path: ./build/bin/bfsd

release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Set Env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Checkout Code
uses: actions/checkout@v3

# ==============================
# Download artifacts
# ==============================

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: linux
path: ./linux

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: macos
path: ./macos

# Rename assets
- run: |
mv ./linux/bfsd ./linux/linux
mv ./macos/bfsd ./macos/macos

# ==============================
# Create release
# ==============================
- name: Generate Change Log
id: changelog
run: |
chmod 755 ./.github/generate_change_log.sh
CHANGELOG=$(./.github/generate_change_log.sh ${{ env.RELEASE_VERSION }})
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_SECRET }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.RELEASE_VERSION}}
release_name: ${{ env.RELEASE_VERSION}}
body: |
${{ env.CHANGELOG }}
draft: false
prerelease: false
files: |
./linux/linux
./macos/macos
8 changes: 4 additions & 4 deletions .github/workflows/uint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ jobs:
strategy:
matrix:
go-version: [1.18.x]
os: [ubuntu-18.04]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
GOPRIVATE: github.com/bnb-chain
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_SECRET }}
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
# In order:
# * Module download cache
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# Changelog

## v0.0.2
## v0.0.2
This release includes features and bug fixes, mainly:
1. Customized upgrade module;
2. Customized Tendermint with vote pool;
3. EIP712 bug fix;
4. Deployment scripts fix.

* [\#17](https://github.com/bnb-chain/inscription/pull/17) feat: custom upgrade module
* [\#20](https://github.com/bnb-chain/inscription/pull/20) ci: fix release flow
* [\#21](https://github.com/bnb-chain/inscription/pull/21) feat: init balance of relayers in genesis state
* [\#19](https://github.com/bnb-chain/inscription/pull/19) deployment: fix relayer key generation
* [\#16](https://github.com/bnb-chain/inscription/pull/16) feat: pass config to app when creating new app
* [\#14](https://github.com/bnb-chain/inscription/pull/16) disable unnecessary modules


## v0.0.1
This is the first release of the inscription.

It includes three key features:
1. EIP721 signing schema support
2. New staking mechanism
3. Local network set scripts


FEATURES
* [\#11](https://github.com/bnb-chain/inscription/pull/11) feat: customize staking module for inscription
* [\#10](https://github.com/bnb-chain/inscription/pull/10) deployment: local setup scripts
Expand Down
9 changes: 0 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ proto:
build:
go build -o build/bin/bfsd -ldflags="$(ldflags)" ./cmd/bfsd/main.go

build-linux:
GOOS=linux go build -o build/bin/bfsd-linux -ldflags="$(ldflags)" ./cmd/bfsd/main.go

build-windows:
GOOS=windows go build -o build/bin/bfsd-windows -ldflags="$(ldflags)" ./cmd/bfsd/main.go

build-mac:
GOOS=darwin go build -o build/bin/bfsd-mac -ldflags="$(ldflags)" ./cmd/bfsd/main.go

docker-image:
go mod vendor # temporary, should be removed after open source
docker build . -t ${IMAGE_NAME}
Expand Down
2 changes: 1 addition & 1 deletion app/ante/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func NewApp(options ...func(baseApp *baseapp.BaseApp)) (*app.App, params.Encodin
encCfg := app.MakeEncodingConfig()

nApp := app.New(
logger, db, nil, true, map[int64]bool{}, app.DefaultNodeHome, 0, encCfg, simapp.EmptyAppOptions{}, options...)
logger, db, nil, true, app.DefaultNodeHome, 0, encCfg, app.NewDefaultAppConfig(), simapp.EmptyAppOptions{}, options...)

genesisState := app.NewDefaultGenesisState(encCfg.Marshaler)
genesisState, _ = genesisStateWithValSet(nApp, genesisState, valSet, []authtypes.GenesisAccount{acc}, balance)
Expand Down
Loading