Skip to content
Myr

release.yml

This file

Path

.github/workflows/release.yml

76 lines · 2.2 KiB · YAML

Last changed by

Bump actions/setup-go from 6 to 7 (#4867)dependabot[bot]before adoption4215d89

History of this file

Take it

Add GitHub Actions release workflowJunegunn Choibefore adoption5e13761

lines 1–21why, one step back
1name: Release
23on:4 push:5 tags:6 - 'v*'7 workflow_dispatch:8 inputs:9 version:10 description: 'Version to validate (e.g. 0.73.0).'11 type: string12 required: true1314permissions:15 contents: write1617jobs:18 release:19 runs-on: macos-latest20 environment: release21 steps:

Bump actions/checkout from 5 to 7 (#4844)dependabot[bot]before adoption1090578

line 22why, one step back
22 - uses: actions/checkout@v7

Add GitHub Actions release workflowJunegunn Choibefore adoption5e13761

lines 23–25why, one step back
23 with:
24 fetch-depth: 025

Bump actions/setup-go from 6 to 7 (#4867)dependabot[bot]before adoption4215d89

line 26why, one step back
26 - uses: actions/setup-go@v7

Add GitHub Actions release workflowJunegunn Choibefore adoption5e13761

lines 27–62why, one step back
27 with:
28 go-version: stable2930 - name: Determine version31 id: ver32 run: |33 if [ "${{ github.event_name }}" = "push" ]; then34 v=${GITHUB_REF_NAME#v}35 else36 v='${{ inputs.version }}'37 fi38 echo "version=$v" >> "$GITHUB_OUTPUT"39 echo "Resolved version: '$v'"4041 - name: Verify version consistency42 run: |43 set -e44 V='${{ steps.ver.outputs.version }}'45 R=$(echo "$V" | sed 's/\./\\./g')46 grep -q "^${R}$" CHANGELOG.md47 grep -qF "\"fzf ${V}\"" man/man1/fzf.148 grep -qF "\"fzf ${V}\"" man/man1/fzf-tmux.149 grep -qF "${V}" install50 grep -qF "${V}" install.ps15152 - name: Extract release notes53 run: |54 set -e55 mkdir -p tmp56 V='${{ steps.ver.outputs.version }}'57 R=$(echo "$V" | sed 's/\./\\./g')58 sed -n "/^${R}$/,/^[0-9]/p" CHANGELOG.md \59 | tail -r | sed '1,/^ *$/d' | tail -r | sed '1,2d' \60 | tee tmp/release-note6162 - name: Run goreleaser

Bump action versions for Node.js 24 supportJunegunn Choibefore adoption9a61a14

line 63why, one step back
63 uses: goreleaser/goreleaser-action@v7

Add GitHub Actions release workflowJunegunn Choibefore adoption5e13761

lines 64–70why, one step back
64 with:
65 version: latest66 args: >-67 ${{ github.event_name == 'push'68 && 'release --clean --release-notes tmp/release-note'69 || 'release --snapshot --clean --skip=publish' }}70 env:

Use PAT in release workflowJunegunn Choibefore adoption5412f39

line 71why, one step back
71 GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}

Add GitHub Actions release workflowJunegunn Choibefore adoption5e13761

lines 72–76why, one step back
72 MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
73 MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}74 MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}75 MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}76 MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}