v0.0.29 #29
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: Build release ZIP | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install root dependencies | |
| run: npm ci | |
| - name: Build compiler | |
| run: npm run build:compiler | |
| - name: Build webpack bundles | |
| run: npm run build | |
| - name: Determine version | |
| id: version | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| - name: Package plugin ZIP | |
| run: | | |
| SLUG="handoff-blocks" | |
| mkdir -p "$SLUG" | |
| rsync -a \ | |
| --exclude='.git' \ | |
| --exclude='.github' \ | |
| --exclude='node_modules' \ | |
| --exclude='.wp-env.json' \ | |
| --exclude='.wp-env.override.json' \ | |
| --exclude='compiler/src' \ | |
| --exclude='compiler/node_modules' \ | |
| --exclude='compiler/tsconfig.json' \ | |
| --exclude='compiler/esbuild.config.mjs' \ | |
| --exclude='compiler/package.json' \ | |
| --exclude='compiler/package-lock.json' \ | |
| --exclude='compiler/dist/index.js' \ | |
| --exclude='compiler/dist/index.unbundled.js' \ | |
| --exclude='compiler/dist/generators' \ | |
| --exclude='compiler/dist/validators' \ | |
| --exclude='compiler/dist/types.*' \ | |
| --exclude='uploads' \ | |
| --exclude='*.plan.md' \ | |
| --exclude='.cursor' \ | |
| ./ "$SLUG/" | |
| zip -r "${SLUG}-${{ steps.version.outputs.tag }}.zip" "$SLUG" | |
| - name: Upload release asset | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: handoff-blocks-${{ steps.version.outputs.tag }}.zip |