-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into qe-add-json-seriaization-span-in-binary-engine
- Loading branch information
Showing
28 changed files
with
771 additions
and
431 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
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: build-prisma-schema-wasm | ||
concurrency: publish-prisma-schema-wasm | ||
|
||
on: | ||
# usually triggered via GH Actions Workflow in prisma/engines-wrapper repo | ||
|
@@ -12,7 +13,7 @@ on: | |
required: true | ||
npmDistTag: | ||
required: true | ||
default: "latest" | ||
default: 'latest' | ||
|
||
jobs: | ||
build: | ||
|
@@ -21,7 +22,7 @@ jobs: | |
steps: | ||
- name: Print input | ||
env: | ||
THE_INPUT: "${{ toJson(github.event.inputs) }}" | ||
THE_INPUT: '${{ toJson(github.event.inputs) }}' | ||
run: | | ||
echo $THE_INPUT | ||
|
@@ -30,25 +31,18 @@ jobs: | |
ref: ${{ github.event.inputs.enginesHash }} | ||
- uses: cachix/install-nix-action@v23 | ||
|
||
# | ||
# Build | ||
# | ||
|
||
- run: nix build .#prisma-schema-wasm | ||
|
||
# | ||
# Publish | ||
# | ||
- name: Build | ||
run: nix build .#prisma-schema-wasm | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "14.x" | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Set up NPM token | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- run: | | ||
PACKAGE_DIR=$( nix run .#renderPrismaSchemaWasmPackage ${{ github.event.inputs.enginesWrapperVersion }}) | ||
- name: Update version in package.json & Publish @prisma/prisma-schema-wasm | ||
run: | ||
# Update version in package.json and return directory for later usage | ||
PACKAGE_DIR=$( nix run .#renderPrismaSchemaWasmPackage ${{ github.event.inputs.enginesWrapperVersion }}) | ||
npm publish "$PACKAGE_DIR" --access public --tag ${{ github.event.inputs.npmDistTag }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
@@ -60,11 +54,10 @@ jobs: | |
- 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/[email protected] | ||
env: | ||
SLACK_TITLE: "prisma-schema-wasm publishing failed :x:" | ||
SLACK_COLOR: "#FF0000" | ||
SLACK_TITLE: 'prisma-schema-wasm publishing failed :x:' | ||
SLACK_COLOR: '#FF0000' | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WASM_FAILING }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.