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

ci: add goreleaser for rosetta and add go cache #14190

Merged
merged 6 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: technote-space/[email protected]
id: git_diff
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-update-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
token: ${{ secrets.PRBOT_PAT }}
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- name: Extract updated dependency
id: deps
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependencies-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- name: "Checkout Repository"
uses: actions/checkout@v3
- name: "Dependency Review"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
# ci is set to go1.19 to match developer setups
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
# get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/cosmovisor/}" >> $GITHUB_ENV
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release-rosetta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release Rosetta

on:
push:
tags:
- "tools/rosetta/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 'rosetta/v*.*.*' and save to $GITHUB_ENV
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/rosetta/}" >> $GITHUB_ENV
# remove the possible pre-existing same tag for cosmos-sdk related tags instead of rosetta 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/rosetta
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: rosetta/${{ env.RELEASE_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sims-045.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ref: "release/v0.45.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- run: make build

install-runsim:
Expand All @@ -32,7 +32,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v3
Expand All @@ -49,7 +49,7 @@ jobs:
ref: "release/v0.45.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand All @@ -67,7 +67,7 @@ jobs:
ref: "release/v0.45.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand All @@ -86,7 +86,7 @@ jobs:
ref: "release/v0.45.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sims-046.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ref: "release/v0.46.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- run: make build

install-runsim:
Expand All @@ -32,7 +32,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v3
Expand All @@ -50,7 +50,7 @@ jobs:
ref: "release/v0.46.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand All @@ -68,7 +68,7 @@ jobs:
ref: "release/v0.46.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand All @@ -86,7 +86,7 @@ jobs:
ref: "release/v0.46.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sims-047.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ref: "release/v0.47.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- run: make build

install-runsim:
Expand All @@ -32,7 +32,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v3
Expand All @@ -50,7 +50,7 @@ jobs:
ref: "release/v0.47.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand All @@ -68,7 +68,7 @@ jobs:
ref: "release/v0.47.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand All @@ -86,7 +86,7 @@ jobs:
ref: "release/v0.47.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sims-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v3
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- run: make build
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
Expand All @@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand All @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand All @@ -71,7 +71,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
go-version: 1.19.4
- uses: actions/cache@v3
with:
path: ~/go/bin
Expand Down
Loading