diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 083302c..a68d5f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,31 +12,31 @@ on: type: string jobs: - build: runs-on: ubuntu-latest environment: release steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - - name: Tag version - run: | - git fetch --force --tags - git tag ${{ github.event.inputs.version }} - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 - with: - distribution: goreleaser - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.PAT }} + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.22 + + - name: Tag version + if: github.event_name == 'workflow_dispatch' + run: | + git fetch --force --tags + git tag --force ${{ github.event.inputs.version }} + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.PAT }}