feat: create config fix tool (#14342)
This commit is contained in:
@@ -35,15 +35,24 @@ jobs:
|
||||
**/go.sum
|
||||
**/Makefile
|
||||
Makefile
|
||||
###################
|
||||
#### Build App ####
|
||||
###################
|
||||
- name: Build
|
||||
if: env.GIT_DIFF
|
||||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
|
||||
- name: Build Legacy
|
||||
if: env.GIT_DIFF
|
||||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false COSMOS_BUILD_OPTIONS=legacy make build
|
||||
###################
|
||||
## Build Tooling ##
|
||||
###################
|
||||
- name: Build Cosmovisor
|
||||
if: env.GIT_DIFF
|
||||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make cosmovisor
|
||||
- name: Build Rosetta
|
||||
if: env.GIT_DIFF
|
||||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make rosetta
|
||||
- name: Build Confix
|
||||
if: env.GIT_DIFF
|
||||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make confix
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
name: Release Confix
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "tools/confix/v*.*.*"
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
permissions:
|
||||
contents: write # for goreleaser/goreleaser-action to create a GitHub release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19.4
|
||||
# get 'v*.*.*' part from 'confix/v*.*.*' and save to $GITHUB_ENV
|
||||
- name: Set env
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/confix/}" >> $GITHUB_ENV
|
||||
# remove the possible pre-existing same tag for cosmos-sdk related tags instead of confix tags
|
||||
# Because goreleaser enforces semantic versioning and will error on non compliant tags.(https://goreleaser.com/limitations/semver/)
|
||||
- name: Tag without prefix locally to avoid error in goreleaser
|
||||
run: |-
|
||||
git tag -d ${{ env.RELEASE_VERSION }} || echo "No such a tag exists before"
|
||||
git tag ${{ env.RELEASE_VERSION }} HEAD
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
# stick to version v0.179.0(https://github.com/cosmos/cosmos-sdk/issues/11125)
|
||||
version: v0.179.0
|
||||
args: release --rm-dist --skip-validate --release-notes ./RELEASE_NOTES.md
|
||||
workdir: tools/confix
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GORELEASER_CURRENT_TAG: confix/${{ env.RELEASE_VERSION }}
|
||||
@@ -581,3 +581,33 @@ jobs:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_X_NFT }}
|
||||
with:
|
||||
projectBaseDir: x/nft/
|
||||
|
||||
test-confix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19.4
|
||||
cache: true
|
||||
cache-dependency-path: tools/confix/go.sum
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
tools/confix/**/*.go
|
||||
tools/confix/go.mod
|
||||
tools/confix/go.sum
|
||||
- name: tests
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
cd tools/confix
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./...
|
||||
- name: sonarcloud
|
||||
if: env.GIT_DIFF
|
||||
uses: SonarSource/sonarcloud-github-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CONFIX }}
|
||||
with:
|
||||
projectBaseDir: tools/confix/
|
||||
|
||||
Reference in New Issue
Block a user