Skip to content

docs: protocol scope + trace-format design spike (#19) #5

docs: protocol scope + trace-format design spike (#19)

docs: protocol scope + trace-format design spike (#19) #5

Workflow file for this run

name: Release
on:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: Version, Publish, Tag & Release
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create release PR or publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset publish
version: pnpm changeset version
title: 'chore: version packages'
commit: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create ecosystem tag and GitHub release
if: steps.changesets.outputs.published == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Determine the ecosystem tag from the latest published version
LATEST_TAG=""
for pkg in packages/*/; do
if [ -f "$pkg/package.json" ]; then
VERSION=$(node -p "require('./$pkg/package.json').version" 2>/dev/null || echo "")
if [ -n "$VERSION" ]; then
# Extract major.minor for ecosystem tag (e.g. 0.1.0 -> v0.1.0)
TAG="release-v$(echo "$VERSION" | cut -d. -f1-2).0"
LATEST_TAG="$TAG"
fi
fi
done
if [ -n "$LATEST_TAG" ] && ! gh release view "$LATEST_TAG" >/dev/null 2>&1; then
echo "Creating GitHub release: $LATEST_TAG"
gh release create "$LATEST_TAG" \
--title "$LATEST_TAG" \
--notes-from-tag \
--generate-notes
else
echo "Tag $LATEST_TAG already exists or no packages published"
fi