Skip to content

fix: fetch tag after creation for goreleaser #3

fix: fetch tag after creation for goreleaser

fix: fetch tag after creation for goreleaser #3

Workflow file for this run

name: CI
on:
push:
branches: [main]
jobs:
test:
uses: ./.github/workflows/test.yaml
release:
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version and push tag
id: tag
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: patch
- name: Fetch new tag
run: git fetch --tags
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ steps.tag.outputs.new_tag }}