2023-02-18 22:42:15 -06:00
|
|
|
name: goreleaser
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-02-18 23:32:26 -06:00
|
|
|
# run only against tags
|
|
|
|
tags:
|
|
|
|
- '*'
|
2023-02-18 22:42:15 -06:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
packages: write
|
|
|
|
# issues: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
goreleaser:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2025-02-14 14:46:10 -06:00
|
|
|
- uses: actions/checkout@v4
|
2023-02-18 22:42:15 -06:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch --force --tags
|
2025-02-14 14:46:10 -06:00
|
|
|
- uses: actions/setup-go@v5
|
2023-02-18 22:42:15 -06:00
|
|
|
with:
|
2025-02-14 12:19:21 -06:00
|
|
|
go-version: '1.23'
|
2023-02-18 22:42:15 -06:00
|
|
|
cache: true
|
|
|
|
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
|
|
|
# on your needs.
|
2025-02-11 23:05:08 -06:00
|
|
|
- uses: olegtarasov/get-tag@v2.1.4
|
|
|
|
id: tagName
|
2023-02-18 23:32:26 -06:00
|
|
|
with:
|
2025-02-11 23:05:08 -06:00
|
|
|
# tagRegex: "foobar-(.*)" # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined.
|
|
|
|
tagRegexGroup: 1 # Optional. Default is 1.
|
2025-02-14 12:54:05 -06:00
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
2023-02-18 22:42:15 -06:00
|
|
|
with:
|
|
|
|
distribution: goreleaser
|
2025-02-14 13:39:18 -06:00
|
|
|
version: 2.7.0
|
2025-02-14 14:46:10 -06:00
|
|
|
args: release --release-notes=".changes/${{ env.GIT_TAG_NAME }}.md" -f .goreleaser/github.yml --clean
|
2023-02-18 22:42:15 -06:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
|
2025-02-14 14:46:10 -06:00
|
|
|
GIT_TAG_NAME: ${{ steps.tagName.outputs.tag }}
|