2023-02-19 04:42:15 +00:00
|
|
|
name: goreleaser
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-02-19 05:32:26 +00:00
|
|
|
# run only against tags
|
|
|
|
tags:
|
|
|
|
- '*'
|
2023-02-19 04:42:15 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
packages: write
|
|
|
|
# issues: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
goreleaser:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch --force --tags
|
2023-07-02 04:07:31 +00:00
|
|
|
- uses: actions/setup-go@v4
|
2023-02-19 04:42:15 +00:00
|
|
|
with:
|
2023-09-09 15:03:17 +00:00
|
|
|
go-version: '1.20'
|
2023-02-19 04:42:15 +00:00
|
|
|
cache: true
|
|
|
|
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
|
|
|
# on your needs.
|
2023-02-19 05:32:26 +00:00
|
|
|
- name: Get tag
|
|
|
|
id: tag
|
|
|
|
uses: dawidd6/action-get-tag@v1
|
|
|
|
with:
|
|
|
|
# Optionally strip `v` prefix
|
2023-07-02 02:46:54 +00:00
|
|
|
strip_v: false
|
2023-02-19 04:42:15 +00:00
|
|
|
- uses: goreleaser/goreleaser-action@v4
|
|
|
|
with:
|
|
|
|
distribution: goreleaser
|
|
|
|
version: latest
|
2023-02-19 05:32:26 +00:00
|
|
|
args: release --release-notes=".changes/${{steps.tag.outputs.tag}}.md" -f .goreleaser/github.yml --clean
|
2023-02-19 04:42:15 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
|