You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

  1. name: "Release"
  2. on:
  3. push:
  4. branches:
  5. - "RC[0-9]/**"
  6. tags:
  7. - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
  8. jobs:
  9. goreleaser:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v2.3.4
  14. with:
  15. fetch-depth: 0
  16. - uses: actions/setup-go@v2
  17. with:
  18. go-version: '1.16'
  19. - run: echo https://github.com/tendermint/tendermint/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md
  20. if: startsWith(github.ref, 'refs/tags/')
  21. - name: Build
  22. uses: goreleaser/goreleaser-action@v2
  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. - name: Release
  28. uses: goreleaser/goreleaser-action@v2
  29. if: startsWith(github.ref, 'refs/tags/')
  30. with:
  31. version: latest
  32. args: release --rm-dist --release-notes=../release_notes.md
  33. env:
  34. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}