Publish main/aa5ee090ba89988f1dce71be263f4bcd9519b59e commit from prisma-engines to npm package @prisma/engines-version #3550
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-engines | |
| run-name: Publish ${{ github.event.client_payload.branch }}/${{ github.event.client_payload.commit }} commit from prisma-engines to npm package @prisma/engines-version | |
| on: | |
| repository_dispatch: | |
| types: | |
| - publish-engines | |
| concurrency: publish-engines | |
| jobs: | |
| publish-engines: | |
| # Do not change `name`, prisma-engines Buildkite build job depends on this name ending with the commit (<-- is that actually true?) | |
| name: 'Publish engines-wrapper packages for prisma-engines branch ${{ github.event.client_payload.branch }} and commit ${{ github.event.client_payload.commit }}' | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # required for OIDC / Trusted Publishers | |
| steps: | |
| # Debounce so we won't run competing jobs if we merge multiple PRs in prisma-engines in quick succesion | |
| - name: Debounce 1 minute | |
| uses: zachary95/github-actions-debounce@v0.1.0 | |
| with: | |
| wait: 60 | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.BOT_TOKEN_ENGINES_WRAPPER_CI }} | |
| - name: Print input | |
| env: { THE_INPUT: '${{ toJson(github.event.client_payload) }}' } | |
| run: | | |
| echo $THE_INPUT | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Update npm to support Trusted Publishers | |
| run: npm install -g npm@^11.5 | |
| - run: bash .github/workflows/setup.sh | |
| env: | |
| CI: true | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - run: pnpm run publish-all | |
| id: publish_script | |
| env: | |
| CI: true | |
| GITHUB_EVENT_CLIENT_PAYLOAD: ${{ toJson(github.event.client_payload) }} | |
| # https://docs.npmjs.com/generating-provenance-statements | |
| NPM_CONFIG_PROVENANCE: true | |
| - name: Workflow dispatch to prisma/prisma-engines for @prisma/prisma-schema-wasm publish to npm | |
| uses: benc-uk/workflow-dispatch@v1 | |
| with: | |
| workflow: Build and publish @prisma/prisma-schema-wasm | |
| repo: prisma/prisma-engines | |
| token: ${{ secrets.BOT_TOKEN_ENGINES_WRAPPER_DISPATCH_CI }} | |
| inputs: '{ "enginesHash": "${{ github.event.client_payload.commit }}", "enginesWrapperVersion": "${{ steps.publish_script.outputs.new_prisma_version }}", "npmDistTag": "${{ steps.publish_script.outputs.npm_dist_tag }}" }' | |
| - name: Workflow dispatch to prisma/prisma-engines for @prisma/query-compiler-wasm publish to npm | |
| uses: benc-uk/workflow-dispatch@v1 | |
| with: | |
| workflow: Build and publish @prisma/query-compiler-wasm | |
| repo: prisma/prisma-engines | |
| token: ${{ secrets.BOT_TOKEN_ENGINES_WRAPPER_DISPATCH_CI }} | |
| inputs: '{ "enginesHash": "${{ github.event.client_payload.commit }}", "packageVersion": "${{ steps.publish_script.outputs.new_prisma_version }}", "npmDistTag": "${{ steps.publish_script.outputs.npm_dist_tag }}" }' | |
| - name: Workflow dispatch to prisma/prisma-engines for @prisma/schema-engine-wasm publish to npm | |
| uses: benc-uk/workflow-dispatch@v1 | |
| with: | |
| workflow: Build and publish @prisma/schema-engine-wasm | |
| repo: prisma/prisma-engines | |
| token: ${{ secrets.BOT_TOKEN_ENGINES_WRAPPER_DISPATCH_CI }} | |
| inputs: '{ "enginesHash": "${{ github.event.client_payload.commit }}", "packageVersion": "${{ steps.publish_script.outputs.new_prisma_version }}", "npmDistTag": "${{ steps.publish_script.outputs.npm_dist_tag }}" }' | |
| - name: Workflow dispatch to prisma/prisma for version update | |
| uses: benc-uk/workflow-dispatch@v1 | |
| with: | |
| workflow: Update Engines Version | |
| repo: prisma/prisma | |
| token: ${{ secrets.BOT_TOKEN_ENGINES_WRAPPER_DISPATCH_CI }} | |
| inputs: '{ "version": "${{ steps.publish_script.outputs.new_prisma_version }}", "npmDistTag": "${{ steps.publish_script.outputs.npm_dist_tag }}" }' | |
| - uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| # Optional but recommended, defaults to "Apply automatic changes" | |
| commit_message: engines commit ${{ github.event.client_payload.commit }} | |
| # Optional commit user and author settings | |
| commit_user_name: prisma-bot | |
| commit_user_email: prismabots@gmail.com | |
| commit_author: prisma-bot <prismabots@gmail.com> |