peco.peco/.github/workflows/release.yml
2026-02-19 13:24:24 +09:00

37 lines
904 B
YAML

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
- name: Extract release notes from Changes
run: |
tag="${{ github.ref_name }}"
sed -n "/^${tag} /,/^v[0-9]/{/^v[0-9]/!p}" Changes > release-notes.md
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6
with:
version: "~> v2"
args: release --clean --release-notes=release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}