release.yml 622 B

123456789101112131415161718192021222324252627282930
  1. on:
  2. push:
  3. tags:
  4. - "v[0-9]+.[0-9]+.[0-9]*"
  5. name: Create release and upload binaries
  6. permissions:
  7. contents: write
  8. jobs:
  9. goreleaser:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v3
  13. with:
  14. fetch-depth: 0
  15. - run: git fetch --force --tags
  16. - uses: actions/setup-go@v3
  17. with:
  18. go-version: '>=1.17.0'
  19. cache: true
  20. - uses: goreleaser/goreleaser-action@v4
  21. with:
  22. distribution: goreleaser
  23. version: latest
  24. args: release --clean
  25. env:
  26. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}