github.com/Oyster-zx/tendermint@v0.34.24-fork/.github/workflows/pre-release.yml (about)

     1  name: "Pre-release"
     2  
     3  on:
     4    push:
     5      tags:
     6        - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"  # e.g. v0.37.0-alpha.1, v0.38.0-alpha.10
     7        - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"   # e.g. v0.37.0-beta.1, v0.38.0-beta.10
     8        - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"      # e.g. v0.37.0-rc1, v0.38.0-rc10
     9  
    10  jobs:
    11    prerelease:
    12      runs-on: ubuntu-latest
    13      steps:
    14        - name: Checkout
    15          uses: actions/checkout@v3
    16          with:
    17            fetch-depth: 0
    18  
    19        - uses: actions/setup-go@v3
    20          with:
    21            go-version: '1.18'
    22  
    23        - name: Build
    24          uses: goreleaser/goreleaser-action@v3
    25          if: ${{ github.event_name == 'pull_request' }}
    26          with:
    27            version: latest
    28            args: build --skip-validate   # skip validate skips initial sanity checks in order to be able to fully run
    29  
    30        # Link to CHANGELOG_PENDING.md as release notes.
    31        - run: echo https://github.com/tendermint/tendermint/blob/${GITHUB_REF#refs/tags/}/CHANGELOG_PENDING.md > ../release_notes.md
    32  
    33        - name: Release
    34          uses: goreleaser/goreleaser-action@v3
    35          if: startsWith(github.ref, 'refs/tags/')
    36          with:
    37            version: latest
    38            args: release --rm-dist --release-notes=../release_notes.md
    39          env:
    40            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    41  
    42    prerelease-success:
    43      needs: prerelease
    44      if: ${{ success() }}
    45      runs-on: ubuntu-latest
    46      steps:
    47        - name: Notify Slack upon pre-release
    48          uses: slackapi/slack-github-action@v1.23.0
    49          env:
    50            SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
    51            SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
    52            RELEASE_URL: "${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
    53          with:
    54            payload: |
    55              {
    56                "blocks": [
    57                  {
    58                    "type": "section",
    59                    "text": {
    60                      "type": "mrkdwn",
    61                      "text": ":sparkles: New Tendermint pre-release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>"
    62                    }
    63                  }
    64                ]
    65              }