Skip to content

Release v0.2.2 - self-host JS lint + typecheck (#2) #2

Release v0.2.2 - self-host JS lint + typecheck (#2)

Release v0.2.2 - self-host JS lint + typecheck (#2) #2

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
permissions:
contents: write
# Creates a GitHub Release whose body is the matching `## [X.Y.Z]` block
# from CHANGELOG.md. The tag `vX.Y.Z` must point at a commit where that
# block already exists (rename `## [Unreleased]` to `## [X.Y.Z]` before
# tagging). Release title is the annotated tag subject if present, else
# the tag name. Fails loudly if the CHANGELOG has no matching section.
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
tag="${GITHUB_REF_NAME}"
version="${tag#v}"
notes=$(mktemp)
python3 .github/scripts/extract-changelog-section.py \
--file CHANGELOG.md \
--version "$version" \
> "$notes"
echo "--- release notes preview for $tag ---"
cat "$notes"
echo "---"
title=$(git tag -l --format='%(contents:subject)' "$tag")
[ -z "$title" ] && title="$tag"
echo "release title: $title"
gh release create "$tag" \
--title "$title" \
--notes-file "$notes"