fix for GitHub Actions

This commit is contained in:
Andrew 2023-02-18 23:32:26 -06:00
parent 951bf97eb2
commit 9fd60b6bf7

View File

@ -2,8 +2,9 @@ name: goreleaser
on: on:
push: push:
branches: [ master ] # your default branch if different # run only against tags
paths: [ CHANGELOG.md ] # your changelog file if different tags:
- '*'
permissions: permissions:
contents: write contents: write
@ -24,12 +25,17 @@ jobs:
cache: true cache: true
# More assembly might be required: Docker logins, GPG, etc. It all depends # More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs. # 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 - uses: goreleaser/goreleaser-action@v4
with: with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser distribution: goreleaser
version: latest 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: env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }} GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' # Your GoReleaser Pro key, if you are using the 'goreleaser-pro'