name: release-main on: push: tags: - "*" env: GOPATH: /go_path GOCACHE: /go_cache jobs: release-image: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-20.04 steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 # all history for all branches and tags - uses: actions/setup-go@v5 with: go-version-file: go.mod check-latest: true - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 id: hash-go with: patterns: | go.mod go.sum - name: cache go id: cache-go uses: actions/cache@v4 with: path: | /go_path /go_cache key: go_path-${{ steps.hash-go.outputs.hash } - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser version: "~> v2" args: release --clean env: GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} GORELEASER_FORCE_TOKEN: "gitea"