Version Packages (#1096) #2567
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 and test PGlite packages | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| message: | |
| description: 'Build PGLite packages' | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| jobs: | |
| stylecheck: | |
| name: Stylecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Stylecheck packages | |
| run: pnpm -r stylecheck | |
| build-all: | |
| name: Install, build all and test as described in README | |
| runs-on: blacksmith-32vcpu-ubuntu-2204 | |
| env: | |
| BUILD_CONFIG_FILE: postgres-pglite/.buildconfig | |
| TZ: UTC | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install | |
| working-directory: ${{ github.workspace }} | |
| run: pnpm install | |
| - name: Get postgres-pglite submodule hash | |
| id: postgres-pglite-commit-id | |
| run: echo "hash=$(git rev-parse HEAD:postgres-pglite)" >> "$GITHUB_OUTPUT" | |
| - name: Get PGlite version | |
| id: pglite-version | |
| run: echo "version=$(pnpm -s pglite:version)" >> "$GITHUB_OUTPUT" | |
| - name: Cache WASM build artifacts | |
| id: postgres-pglite-cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| packages/pglite/release | |
| packages/pglite-tools/release | |
| packages/pglite-age/release | |
| packages/pglite-pg_hashids/release | |
| packages/pglite-pg_ivm/release | |
| packages/pglite-pgtap/release | |
| packages/pglite-pg_textsearch/release | |
| packages/pglite-pg_uuidv7/release | |
| packages/pglite-postgis/release | |
| packages/pglite-pgvector/release | |
| packages/pglite-pgmq/release | |
| key: wasm-build-${{ steps.postgres-pglite-commit-id.outputs.hash }}-pglite-${{ steps.pglite-version.outputs.version }} | |
| - name: Build all if necessary | |
| if: steps.postgres-pglite-cache.outputs.cache-hit != 'true' | |
| working-directory: ${{ github.workspace }} | |
| env: | |
| PGSRC: ${{ github.workspace }}/postgres-pglite | |
| run: pnpm build:all | |
| - name: Build TS only packages if postgres-pglite artifacts already available | |
| if: steps.postgres-pglite-cache.outputs.cache-hit == 'true' | |
| working-directory: ${{ github.workspace }} | |
| run: pnpm ts:build | |
| - name: Upload PGlite Interim to Github artifacts | |
| id: upload-pglite-interim-build-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-interim-build-files-node-v20.x | |
| path: ./packages/pglite/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-tools build artifacts to Github artifacts | |
| id: upload-pglite-tools-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-tools-release-files-node-v20.x | |
| path: ./packages/pglite-tools/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-postgis build artifacts to Github artifacts | |
| id: upload-pglite-postgis-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-postgis-release-files-node-v20.x | |
| path: ./packages/pglite-postgis/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-pg_hashids build artifacts to Github artifacts | |
| id: upload-pglite-pg-hashids-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pg-hashids-release-files-node-v20.x | |
| path: ./packages/pglite-pg_hashids/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-pg_ivm build artifacts to Github artifacts | |
| id: upload-pglite-pg-ivm-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pg-ivm-release-files-node-v20.x | |
| path: ./packages/pglite-pg_ivm/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-pgtap build artifacts to Github artifacts | |
| id: upload-pglite-pgtap-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pgtap-release-files-node-v20.x | |
| path: ./packages/pglite-pgtap/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-pg_textsearch build artifacts to Github artifacts | |
| id: upload-pglite-pg-textsearch-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pg-textsearch-release-files-node-v20.x | |
| path: ./packages/pglite-pg_textsearch/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-pg_uuidv7 build artifacts to Github artifacts | |
| id: upload-pglite-pg-uuidv7-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pg-uuidv7-release-files-node-v20.x | |
| path: ./packages/pglite-pg_uuidv7/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-pgvector build artifacts to Github artifacts | |
| id: upload-pglite-pgvector-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pgvector-release-files-node-v20.x | |
| path: ./packages/pglite-pgvector/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-pgvector dist artifacts to Github artifacts | |
| id: upload-pglite-pgvector-dist-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pgvector-dist-files-node-v20.x | |
| path: ./packages/pglite-pgvector/dist/** | |
| - name: Upload pglite-age build artifacts to Github artifacts | |
| id: upload-pglite-age-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-age-release-files-node-v20.x | |
| path: ./packages/pglite-age/release/** | |
| retention-days: 60 | |
| - name: Upload pglite-pgmq build artifacts to Github artifacts | |
| id: upload-pglite-pgmq-release-files | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pgmq-release-files-node-v20.x | |
| path: ./packages/pglite-pgmq/release/** | |
| retention-days: 60 | |
| - name: Typecheck pglite | |
| working-directory: ${{ github.workspace }}/packages/pglite | |
| run: pnpm typecheck | |
| - name: Test pglite | |
| working-directory: ${{ github.workspace }}/packages/pglite | |
| run: pnpm test | |
| build-and-test-pglite: | |
| name: Build and Test packages/pglite | |
| runs-on: blacksmith-32vcpu-ubuntu-2204 | |
| strategy: | |
| matrix: | |
| node: [20.x, 21.x, 22.x, 23.x, 24.x] | |
| fail-fast: false # allow the build to continue even if some tests fail | |
| defaults: | |
| run: | |
| working-directory: ./packages/pglite | |
| needs: [build-all] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: vx.x.x | |
| - name: Download PGlite WASM build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-interim-build-files-node-v20.x | |
| path: ./packages/pglite/release | |
| - name: Download pglite-tools WASM build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-tools-release-files-node-v20.x | |
| path: ./packages/pglite-tools/release | |
| - name: Download pglite-postgis build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-postgis-release-files-node-v20.x | |
| path: ./packages/pglite-postgis/release | |
| - name: Download pglite-pgvector build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgvector-dist-files-node-v20.x | |
| path: ./packages/pglite-pgvector/dist | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| pnpm exec playwright install --with-deps | |
| - name: Build dependencies | |
| run: pnpm --filter "pglite^..." build | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Build | |
| run: pnpm build | |
| - name: Test web integrations | |
| # retry on failure as web tests can be flaky | |
| run: pnpm test:web || pnpm test:web || pnpm test:web | |
| - name: Test Deno | |
| run: pnpm test:deno | |
| - name: Pack pglite for distribution | |
| run: pnpm pack | |
| - name: Upload PGlite distribution artifact | |
| id: upload-pglite-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite/dist/* | |
| - name: Upload PGlite package artifact | |
| id: upload-pglite-package | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-package-node-v${{ matrix.node }} | |
| path: ./packages/pglite/electric-sql-pglite-*.tgz | |
| retention-days: 60 | |
| - name: Find Comment | |
| uses: peter-evans/find-comment@v4 | |
| id: fc | |
| if: github.event_name == 'pull_request' | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: 'github-actions[bot]' | |
| body-includes: '- PGlite with node' | |
| - name: Create or update build outputs comment | |
| uses: peter-evans/create-or-update-comment@v5 | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| continue-on-error: true | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| - PGlite with node v${{ matrix.node }}: ${{ steps.upload-pglite-package.outputs.artifact-url }} | |
| edit-mode: append | |
| - name: Pack pglite-icu-full for distribution | |
| working-directory: ./packages/pglite-icu-full | |
| run: pnpm build && pnpm pack | |
| - name: Upload pglite-icu-full distribution artifact | |
| id: upload-pglite-icu-full | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-icu-full-node-v${{ matrix.node }} | |
| path: ./packages/pglite-icu-full/electric-sql-pglite-icu-full-*.tgz | |
| build-and-test-pglite-dependents: | |
| name: Build and Test packages dependent on PGlite | |
| runs-on: blacksmith-32vcpu-ubuntu-2204 | |
| strategy: | |
| matrix: | |
| node: [20.x, 21.x, 22.x, 23.x, 24.x] | |
| fail-fast: false # allow the build to continue even if some tests fail | |
| needs: [build-and-test-pglite] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - name: Download PGlite build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite/dist/ | |
| - name: Download pglite-tools WASM build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-tools-release-files-node-v20.x | |
| path: ./packages/pglite-tools/release/ | |
| - name: Download pglite-postgis build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-postgis-release-files-node-v20.x | |
| path: ./packages/pglite-postgis/release/ | |
| - name: Download pglite-pg_hashids build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-hashids-release-files-node-v20.x | |
| path: ./packages/pglite-pg_hashids/release/ | |
| - name: Download pglite-pg_ivm build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-ivm-release-files-node-v20.x | |
| path: ./packages/pglite-pg_ivm/release/ | |
| - name: Download pglite-pgtap build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgtap-release-files-node-v20.x | |
| path: ./packages/pglite-pgtap/release/ | |
| - name: Download pglite-pg_textsearch build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-textsearch-release-files-node-v20.x | |
| path: ./packages/pglite-pg_textsearch/release/ | |
| - name: Download pglite-pg_uuidv7 build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-uuidv7-release-files-node-v20.x | |
| path: ./packages/pglite-pg_uuidv7/release/ | |
| - name: Download pglite-pgvector build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgvector-release-files-node-v20.x | |
| path: ./packages/pglite-pgvector/release/ | |
| - name: Download pglite-age build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-age-release-files-node-v20.x | |
| path: ./packages/pglite-age/release/ | |
| - name: Download pglite-pgmq build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgmq-release-files-node-v20.x | |
| path: ./packages/pglite-pgmq/release/ | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build pglite-utils | |
| run: pnpm --filter "@electric-sql/pglite-utils" build | |
| - name: Build pg-protocol | |
| run: pnpm --filter "@electric-sql/pg-protocol" build | |
| - name: Build packages | |
| run: pnpm --filter="...^pglite" build | |
| - name: Typecheck packages | |
| run: pnpm --filter="...^pglite" typecheck | |
| - name: Test packages | |
| run: pnpm --filter="...^pglite" test | |
| - name: Upload pglite-tools distribution artifact | |
| id: upload-pglite-tools-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-tools-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-tools/dist/* | |
| - name: Upload pglite-postgis distribution artifact | |
| id: upload-pglite-postgis-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-postgis-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-postgis/dist/* | |
| - name: Upload pglite-age distribution artifact | |
| id: upload-pglite-age-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-age-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-age/dist/* | |
| - name: Upload pglite-pg_hashids distribution artifact | |
| id: upload-pglite-pg-hashids-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pg-hashids-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-pg_hashids/dist/* | |
| - name: Upload pglite-pg_ivm distribution artifact | |
| id: upload-pglite-pg-ivm-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pg-ivm-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-pg_ivm/dist/* | |
| - name: Upload pglite-pgtap distribution artifact | |
| id: upload-pglite-pgtap-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pgtap-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-pgtap/dist/* | |
| - name: Upload pglite-pg_textsearch distribution artifact | |
| id: upload-pglite-pg-textsearch-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pg-textsearch-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-pg_textsearch/dist/* | |
| - name: Upload pglite-pg_uuidv7 distribution artifact | |
| id: upload-pglite-pg-uuidv7-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pg-uuidv7-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-pg_uuidv7/dist/* | |
| - name: Upload pglite-pgvector distribution artifact | |
| id: upload-pglite-pgvector-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pgvector-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-pgvector/dist/* | |
| - name: Upload pglite-pgmq distribution artifact | |
| id: upload-pglite-pgmq-dist | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-pgmq-dist-node-v${{ matrix.node }} | |
| path: ./packages/pglite-pgmq/dist/* | |
| publish-website-with-demos: | |
| name: Publish website with demos | |
| runs-on: blacksmith-4vcpu-ubuntu-2204 | |
| needs: [build-and-test-pglite, build-and-test-pglite-dependents] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Download PGlite WASM build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-interim-build-files-node-v20.x | |
| path: ./packages/pglite/release | |
| - name: Download pglite-tools WASM build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-tools-release-files-node-v20.x | |
| path: ./packages/pglite-tools/release | |
| - name: Download pglite-postgis build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-postgis-release-files-node-v20.x | |
| path: ./packages/pglite-postgis/release/ | |
| - name: Download PGlite build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-dist-node-v20.x | |
| path: ./packages/pglite/dist/ | |
| - name: Download pglite-postgis dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-postgis-dist-node-v20.x | |
| path: ./packages/pglite-postgis/dist/ | |
| - name: Download pglite-age dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-age-dist-node-v20.x | |
| path: ./packages/pglite-age/dist/ | |
| - name: Download pglite-pg_hashids dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-hashids-dist-node-v20.x | |
| path: ./packages/pglite-pg_hashids/dist/ | |
| - name: Download pglite-pg_ivm dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-ivm-dist-node-v20.x | |
| path: ./packages/pglite-pg_ivm/dist/ | |
| - name: Download pglite-pgtap dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgtap-dist-node-v20.x | |
| path: ./packages/pglite-pgtap/dist/ | |
| - name: Download pglite-pg_textsearch dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-textsearch-dist-node-v20.x | |
| path: ./packages/pglite-pg_textsearch/dist/ | |
| - name: Download pglite-pg_uuidv7 dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-uuidv7-dist-node-v20.x | |
| path: ./packages/pglite-pg_uuidv7/dist/ | |
| - name: Download pglite-pgvector dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgvector-dist-node-v20.x | |
| path: ./packages/pglite-pgvector/dist/ | |
| - name: Download pglite-pgmq dist artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgmq-dist-node-v20.x | |
| path: ./packages/pglite-pgmq/dist/ | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build REPL and benchmark packages needed for examples | |
| run: pnpm --filter "@electric-sql/pglite-react" --filter "@electric-sql/pglite-repl" --filter "benchmark" build | |
| - name: Download PGlite web build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-interim-build-files-node-v20.x | |
| path: /tmp/web | |
| - name: Download pglite-tools dist artifacts to tmp | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-tools-dist-node-v20.x | |
| path: /tmp/pglite-tools | |
| - name: Build demo site | |
| env: | |
| PGSRC: ${{ github.workspace }}/postgres-pglite | |
| POSTGRES_PGLITE_OUT: ${{ github.workspace }}/packages/pglite/release | |
| PGLITE: ${{ github.workspace }}/packages/pglite | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| mkdir -p /tmp/web/examples/ /tmp/web/dist /tmp/web/benchmark | |
| cp -r ${PGLITE}/dist/* /tmp/web/dist/ | |
| cp -r ${PGLITE}/examples/* /tmp/web/examples/ | |
| cp -r ${{ github.workspace }}/packages/benchmark/dist/* /tmp/web/benchmark/ | |
| rm -rf /tmp/web/examples/pglite-tools | |
| cp -r /tmp/pglite-tools /tmp/web/examples/ | |
| - name: Build docs | |
| working-directory: ./docs | |
| run: | | |
| pnpm run docs:build | |
| cp -r ./.vitepress/dist/* /tmp/web/ | |
| - name: Upload Demos to Github artifacts | |
| id: upload-demos | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pglite-demos | |
| path: /tmp/web/** | |
| retention-days: 60 | |
| - name: Find Comment | |
| uses: peter-evans/find-comment@v4 | |
| id: fc | |
| if: github.event_name == 'pull_request' | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: 'github-actions[bot]' | |
| body-includes: "- Demos:" | |
| - name: Create or update build outputs comment | |
| uses: peter-evans/create-or-update-comment@v5 | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| continue-on-error: true | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| - Demos: ${{ steps.upload-demos.outputs.artifact-url }} | |
| edit-mode: append | |
| - name: Deploy website to Netlify | |
| uses: nwtgck/actions-netlify@v4.0 | |
| with: | |
| publish-dir: '/tmp/web' | |
| production-branch: master | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-message: 'Deploy PR${{ github.event.pull_request.id }}: ${{ github.event.pull_request.title }}' | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| timeout-minutes: 1 | |
| changesets-release: | |
| if: github.event_name == 'push' | |
| permissions: | |
| id-token: write # Required for npm trusted publishing (OIDC) | |
| contents: write # to create release (changesets/action) | |
| issues: write # to post issue comments (changesets/action) | |
| pull-requests: write # to create pull request (changesets/action) | |
| name: Make a PR or publish | |
| runs-on: ubuntu-22.04 | |
| needs: [build-all] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 # Required for npm trusted publishing (npm 11.5.1+) | |
| cache: pnpm | |
| - name: Download PGlite WASM build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-interim-build-files-node-v20.x | |
| path: ./packages/pglite/release | |
| - name: Download pglite-tools build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-tools-release-files-node-v20.x | |
| path: ./packages/pglite-tools/release/ | |
| - name: Download pglite-postgis build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-postgis-release-files-node-v20.x | |
| path: ./packages/pglite-postgis/release/ | |
| - name: Download pglite-pg_hashids build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-hashids-release-files-node-v20.x | |
| path: ./packages/pglite-pg_hashids/release/ | |
| - name: Download pglite-pg_ivm build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-ivm-release-files-node-v20.x | |
| path: ./packages/pglite-pg_ivm/release/ | |
| - name: Download pglite-pgtap build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgtap-release-files-node-v20.x | |
| path: ./packages/pglite-pgtap/release/ | |
| - name: Download pglite-pg_textsearch build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-textsearch-release-files-node-v20.x | |
| path: ./packages/pglite-pg_textsearch/release/ | |
| - name: Download pglite-pg_uuidv7 build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pg-uuidv7-release-files-node-v20.x | |
| path: ./packages/pglite-pg_uuidv7/release/ | |
| - name: Download pglite-pgvector build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgvector-release-files-node-v20.x | |
| path: ./packages/pglite-pgvector/release/ | |
| - name: Download pglite-pgmq build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-pgmq-release-files-node-v20.x | |
| path: ./packages/pglite-pgmq/release/ | |
| - name: Download pglite-age build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pglite-age-release-files-node-v20.x | |
| path: ./packages/pglite-age/release/ | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm --filter "./packages/**" build | |
| - name: Create Release Pull Request or Publish | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm ci:version | |
| publish: pnpm ci:publish | |
| title: 'chore: publish new package versions' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |