Release: v0.7.66 #114
Workflow file for this run
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: Publish to npm | |
| # Trigger when a new release is created OR when a version tag is pushed (so publish runs even if create-release skips) | |
| on: | |
| release: | |
| types: [created] | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| if [ -n "${{ github.event.release.tag_name }}" ]; then | |
| TAG="${{ github.event.release.tag_name }}" | |
| else | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| fi | |
| VERSION=${TAG#v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $VERSION from tag: $TAG" | |
| - name: Update package versions (CI only, not committed) | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| for pkg in packages/core packages/extension-* packages/create-app; do | |
| [ -d "$pkg" ] && (cd "$pkg" && npm version "$VERSION" --no-git-tag-version) && echo "Updated $pkg to $VERSION" | |
| done | |
| - name: Build core package | |
| run: npm run build | |
| - name: Run type check | |
| run: npm run type-check | |
| continue-on-error: true | |
| - name: Publish core, extensions, and create-app to npm | |
| run: | | |
| for pkg in packages/core packages/extension-* packages/create-app; do | |
| if [ -d "$pkg" ]; then | |
| if grep -q '"private":\s*true' "$pkg/package.json" 2>/dev/null; then | |
| echo "Skipping $pkg (private)" | |
| else | |
| echo "Publishing $pkg..." | |
| (cd "$pkg" && npm publish --access public --provenance) | |
| fi | |
| fi | |
| done | |