-
Notifications
You must be signed in to change notification settings - Fork 249
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 perf/remove-implicit-ordering
- Loading branch information
Showing
302 changed files
with
9,157 additions
and
6,614 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
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
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,41 +31,33 @@ 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' | ||
|
||
- name: Set up NPM token | ||
# 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 | ||
|
||
- run: | | ||
- 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 }} | ||
# | ||
# 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/[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
Oops, something went wrong.