goreleaser / goreleaser-action

GitHub Action for GoReleaser
https://github.com/marketplace/actions/goreleaser-action
MIT License
861 stars 75 forks source link

Go Lang 1.18 support #345

Closed safaci2000 closed 2 years ago

safaci2000 commented 2 years ago

I saw an issue already opened for this, but I can't seem to figure out how to use this properly. I'm still getting the same issue.

name: Release GDG on Tag
on: 
  create:
    tags: 
      - '*'

jobs:
  goreleaser:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          submodules: true
          fetch-depth: 0
      - name: Set up Go
        uses: actions/setup-go@v2
      - name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v2
        with:
          distribution: goreleaser
          version: latest
          args: release --rm-dist
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This results in:

release failed after 0.07s error=hook failed: go mod tidy: exit status 1; output: go mod tidy: go.mod file indicates go 1.18, but maximum supported version is 1.15
caarlos0 commented 2 years ago

you need to specify the go version in the setup-go action, goreleaser supports go 1.18.