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