docs: migration guide + ADR-0010 + update all docs for toolkit (#71) #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@v5 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Create release PR or publish | |
| id: changesets | |
| uses: changesets/action@v1.9.0 | |
| 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 }} | |
| NODE_AUTH_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" \ | |
| --generate-notes | |
| else | |
| echo "Tag $LATEST_TAG already exists or no packages published" | |
| fi |