Skip to content

npm - release @prisma/prisma-schema-wasm@5.13.0-9.integration-multi-prisma-fmt-bfd6805a8c6880cd0161f6e57189b9fb8c6bcc7f from bfd6805a8c6880cd0161f6e57189b9fb8c6bcc7f on integration #409

npm - release @prisma/prisma-schema-wasm@5.13.0-9.integration-multi-prisma-fmt-bfd6805a8c6880cd0161f6e57189b9fb8c6bcc7f from bfd6805a8c6880cd0161f6e57189b9fb8c6bcc7f on integration

npm - release @prisma/prisma-schema-wasm@5.13.0-9.integration-multi-prisma-fmt-bfd6805a8c6880cd0161f6e57189b9fb8c6bcc7f from bfd6805a8c6880cd0161f6e57189b9fb8c6bcc7f on integration #409

name: Build and publish @prisma/prisma-schema-wasm
run-name: npm - release @prisma/prisma-schema-wasm@${{ github.event.inputs.enginesWrapperVersion }} from ${{ github.event.inputs.enginesHash }} on ${{ github.event.inputs.npmDistTag }}
concurrency: publish-prisma-schema-wasm
on:
# usually triggered via GH Actions Workflow in prisma/engines-wrapper repo
workflow_dispatch:
inputs:
enginesWrapperVersion:
required: true
description: 'New @prisma/prisma-schema-wasm package version'
enginesHash:
required: true
description: 'prisma-engines commit to build'
npmDistTag:
required: true
default: 'latest'
description: 'npm dist-tag (e.g. latest or integration)'
jobs:
build:
name: Build and publish @prisma/prisma-schema-wasm
runs-on: ubuntu-latest
steps:
- name: Print input
env:
THE_INPUT: '${{ toJson(github.event.inputs) }}'
run: |
echo $THE_INPUT
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.enginesHash }}
- uses: ./.github/workflows/include/rust-wasm-setup
- name: Build
run: make build-schema-wasm PROFILE=release SCHEMA_WASM_VERSION=${{ github.event.inputs.enginesWrapperVersion }}
- uses: actions/setup-node@v4
with:
node-version: '20.x'
# This is needed to be done manually because of `PACKAGE_DIR` used later
- name: Set up NPM token for publishing later
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish @prisma/prisma-schema-wasm
run: npm publish --access public --tag ${{ github.event.inputs.npmDistTag }}
working-directory: target/prisma-schema-wasm
#
# Failure handlers
#
- name: Set current job url in SLACK_FOOTER env var
if: ${{ failure() }}
run: echo "SLACK_FOOTER=<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|Click here to go to the job logs>" >> $GITHUB_ENV
- name: Slack Notification on Failure
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2.3.0
env:
SLACK_TITLE: 'Building and publishing @prisma/prisma-schema-wasm failed :x:'
SLACK_COLOR: '#FF0000'
SLACK_CHANNEL: feed-prisma-schema-wasm-publish-failures
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WASM_FAILING }}