From 9fd60b6bf74ce6f56be5cb153d64ef917cce37d0 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 18 Feb 2023 23:32:26 -0600 Subject: [PATCH] fix for GitHub Actions --- .github/workflows/release.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53cab10..641db88 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,9 @@ name: goreleaser on: push: - branches: [ master ] # your default branch if different - paths: [ CHANGELOG.md ] # your changelog file if different + # run only against tags + tags: + - '*' permissions: contents: write @@ -24,12 +25,17 @@ jobs: cache: true # More assembly might be required: Docker logins, GPG, etc. It all depends # on your needs. + - name: Get tag + id: tag + uses: dawidd6/action-get-tag@v1 + with: + # Optionally strip `v` prefix + strip_v: true - uses: goreleaser/goreleaser-action@v4 with: - # either 'goreleaser' (default) or 'goreleaser-pro': distribution: goreleaser version: latest - args: release --release-notes=".changes/$(go run backy.go version).md" -f .goreleaser/github.yml --clean + args: release --release-notes=".changes/${{steps.tag.outputs.tag}}.md" -f .goreleaser/github.yml --clean env: GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }} # Your GoReleaser Pro key, if you are using the 'goreleaser-pro'