Skip to content

chore: release 1.2.1 #3

chore: release 1.2.1

chore: release 1.2.1 #3

Workflow file for this run

name: GitHub Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Existing tag to publish (e.g. v1.1.1)"
required: true
type: string
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Resolve tag name
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "name=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
else
echo "name=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
fi
- name: Build release notes from CHANGELOG
id: notes
run: |
BODY_FILE="$(mktemp)"
python scripts/extract_changelog.py "${{ steps.tag.outputs.name }}" > "$BODY_FILE"
{
echo "body<<CHANGELOG_EOF"
cat "$BODY_FILE"
echo "CHANGELOG_EOF"
} >> "$GITHUB_OUTPUT"
- name: Create or update GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.name }}
name: ${{ steps.tag.outputs.name }}
body: ${{ steps.notes.outputs.body }}
generate_release_notes: false
make_latest: true