Skip to content

feat: adopt GPT-5.6 Sol-high setup policy #47

feat: adopt GPT-5.6 Sol-high setup policy

feat: adopt GPT-5.6 Sol-high setup policy #47

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: Existing semver tag to publish, for example v1.2.3
required: true
permissions:
contents: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Resolve release tag
id: tag
env:
INPUT_TAG: ${{ github.event.inputs.tag }}
run: |
if [ "${GITHUB_EVENT_NAME}" = "push" ]; then
TAG="${GITHUB_REF_NAME}"
else
TAG="${INPUT_TAG}"
fi
if ! printf '%s\n' "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "Release tags must match vX.Y.Z"
exit 1
fi
git rev-parse "$TAG" >/dev/null 2>&1
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
- name: Check out tagged release commit
run: git checkout "${{ steps.tag.outputs.tag }}"
- name: Set up Node.js for npm publish
uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Validate package version matches release tag
id: package
run: |
PACKAGE_NAME="$(node -p "require('./package.json').name")"
PACKAGE_VERSION="$(node -p "require('./package.json').version")"
TAG_VERSION="${{ steps.tag.outputs.tag }}"
TAG_VERSION="${TAG_VERSION#v}"
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
echo "package.json version $PACKAGE_VERSION does not match tag ${{ steps.tag.outputs.tag }}"
exit 1
fi
echo "name=$PACKAGE_NAME" >> "$GITHUB_OUTPUT"
echo "version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Check whether npm version already exists
id: npm
run: |
if npm view "${{ steps.package.outputs.name }}@${{ steps.package.outputs.version }}" version >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- name: Publish package to npm
if: steps.npm.outputs.exists != 'true'
run: npm publish --access public
- name: Create GitHub Release
uses: softprops/action-gh-release@v3.0.0
with:
tag_name: ${{ steps.tag.outputs.tag }}
generate_release_notes: true
make_latest: true