Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
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.20.1
|
|
# 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 }}
|