build.yml 681 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: build
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches:
  6. - main
  7. concurrency: ${{ github.workflow }}-${{ github.ref }}
  8. permissions:
  9. contents: write
  10. packages: write
  11. jobs:
  12. build:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v3
  16. with:
  17. fetch-depth: 0
  18. - run: git fetch --force --tags
  19. - uses: actions/setup-go@v5
  20. with:
  21. go-version: ">=1.23.2"
  22. cache: true
  23. cache-dependency-path: go.sum
  24. - run: go mod download
  25. - uses: goreleaser/goreleaser-action@v6
  26. with:
  27. distribution: goreleaser
  28. version: latest
  29. args: build --snapshot --clean