github.com/cosmos/cosmos-sdk@v0.50.10/.github/workflows/release-confix.yml (about)

     1  name: Release Confix
     2  
     3  on:
     4    push:
     5      tags:
     6        - "tools/confix/v*.*.*"
     7  permissions:
     8    contents: read
     9  
    10  jobs:
    11    goreleaser:
    12      permissions:
    13        contents: write # for goreleaser/goreleaser-action to create a GitHub release
    14      runs-on: ubuntu-latest
    15      steps:
    16        - uses: actions/checkout@v3
    17        - uses: actions/setup-go@v4
    18          with:
    19            go-version: "1.21"
    20            check-latest: true
    21        # get 'v*.*.*' part from 'confix/v*.*.*' and save to $GITHUB_ENV
    22        - name: Set env
    23          run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/confix/}" >> $GITHUB_ENV
    24        # remove the possible pre-existing same tag for cosmos-sdk related tags instead of confix tags
    25        # Because goreleaser enforces semantic versioning and will error on non compliant tags.(https://goreleaser.com/limitations/semver/)
    26        - name: Tag without prefix locally to avoid error in goreleaser
    27          run: |-
    28            git tag -d ${{ env.RELEASE_VERSION }} || echo "No such a tag exists before"
    29            git tag ${{ env.RELEASE_VERSION }} HEAD
    30        - name: Run GoReleaser
    31          uses: goreleaser/goreleaser-action@v3
    32          with:
    33            # stick to version v0.179.0(https://github.com/cosmos/cosmos-sdk/issues/11125)
    34            version: v0.179.0
    35            args: release --rm-dist --skip-validate --release-notes ./RELEASE_NOTES.md
    36            workdir: tools/confix
    37          env:
    38            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    39            GORELEASER_CURRENT_TAG: confix/${{ env.RELEASE_VERSION }}