diff --git a/.github/workflows/1_2_bump_extension_only.yml b/.github/workflows/1_2_bump_extension_only.yml
deleted file mode 100644
index 1a2405333e..0000000000
--- a/.github/workflows/1_2_bump_extension_only.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-name: 1/2. Bump versions for extension only (on push to main and patch branch)
-
-# This workflow covers both '1_check_for_updates' and '2_bump_versions' workflows, therefore it is another variant of the same, but specifically for extension only, without any Prisma CLI updates that would need to be handled.
-
-on:
- push:
- branches:
- - 'main'
- - '**.x'
- - '!renovate/**'
- paths-ignore:
- - '.github/**'
- workflow_dispatch:
-
-concurrency:
- group: version-management
- cancel-in-progress: false
-
-env:
- ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
- PRISMA_TELEMETRY_INFORMATION: 'language-tools 1_2_bump_extension_only.yml'
-
-jobs:
- bump:
- runs-on: ubuntu-latest
- timeout-minutes: 7
- steps:
- - uses: actions/checkout@v4
- with:
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: checkout main if necessary
- if: endsWith(github.ref, '/main') == false
- run: git fetch && git checkout main
- - name: Install Dependencies
- run: pnpm install
- shell: bash
- - name: Setup Git
- run: |
- sh scripts/set_git_credentials.sh
- - name: Update extension version in scripts folder
- id: update
- run: node scripts/bump_extension_version.mjs extension-patch-release
- - name: Commit and Push
- run: |
- sh scripts/commit_and_push.sh "[skip ci] bump extension version in scripts to ${{ steps.update.outputs.next_extension_version }}."
-
- - name: Checkout previous branch
- if: endsWith(github.ref, '/main') == false
- run: git checkout -f ${{ github.ref_name }}
- - name: Update VS Code extension version
- run: |
- node scripts/update_package_json_files.mjs dev ${{ steps.update.outputs.next_extension_version }} ""
- - name: Install Dependencies
- run: pnpm install
- - name: Commit and Push
- run: |
- sh scripts/commit_and_push.sh "[skip ci] bump extension version in package.json to ${{ steps.update.outputs.next_extension_version }}." ${{ steps.setup_branch.outputs.new_branch }}
-
- - name: Trigger next workflow for Language Server tests
- if: endsWith(github.ref, '/main')
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 3. Test Language Server and publish
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "release_channel": "insider", "extension_version": "${{ steps.update.outputs.next_extension_version }}", "branch": "main", "trigger_reason": "Commit from ${{ github.ref_name }}" }'
diff --git a/.github/workflows/1_2_stable_extension_release.yml b/.github/workflows/1_2_stable_extension_release.yml
deleted file mode 100644
index 1a5a963c3f..0000000000
--- a/.github/workflows/1_2_stable_extension_release.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-name: 1/2. Bump and release a stable version of the extension, meant for manual releases
-
-# This workflow covers both '1_check_for_updates' and '2_bump_versions' workflows, therefore it is another variant of the same, but specifically for extension only, without any Prisma CLI updates that would need to be handled.
-
-on:
- workflow_dispatch:
- inputs:
- release_type:
- description: 'Type of release to perform'
- required: true
- type: choice
- options:
- - patch
- - minor
- - major
-
-concurrency:
- group: version-management
- cancel-in-progress: false
-
-env:
- ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
- PRISMA_TELEMETRY_INFORMATION: 'language-tools 1_2_stable_extension_release.yml'
-
-jobs:
- bump:
- runs-on: ubuntu-latest
- timeout-minutes: 7
- steps:
- - uses: actions/checkout@v4
- with:
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: Install Dependencies
- run: pnpm install
- shell: bash
- - name: Setup Git
- run: |
- sh scripts/set_git_credentials.sh
- - name: Update extension version in scripts folder
- id: update
- run: node scripts/bump_extension_version.mjs extension-${{ github.event.inputs.release_type }}-release
- - name: Commit and Push
- run: |
- sh scripts/commit_and_push.sh "[skip ci] bump extension version in scripts to ${{ steps.update.outputs.next_extension_version }}."
- - name: Update VS Code extension version
- run: |
- node scripts/update_package_json_files.mjs latest ${{ steps.update.outputs.next_extension_version }} ""
- - name: Install Dependencies
- run: pnpm install
- - name: Commit and Push
- run: |
- sh scripts/commit_and_push.sh "[skip ci] bump extension version in package.json to ${{ steps.update.outputs.next_extension_version }}."
-
- - name: Trigger next workflow for Language Server tests
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 3. Test Language Server and publish
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "release_channel": "stable", "extension_version": "${{ steps.update.outputs.next_extension_version }}", "branch": "main", "trigger_reason": "Manual ${{ github.event.inputs.release_type }} stable extension release" }'
diff --git a/.github/workflows/1_check_for_updates.yml b/.github/workflows/1_check_for_updates.yml
deleted file mode 100644
index 0f54ed2c78..0000000000
--- a/.github/workflows/1_check_for_updates.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-name: 1. Check for Prisma CLI Update
-
-on:
- # Scheduled trigger disabled: ORM iteration is paused; CLI-update polling
- # runs on demand. Restore the `schedule:` block below to re-enable.
- # schedule:
- # - cron: '*/5 * * * *'
- workflow_dispatch:
-
-env:
- ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
- PRISMA_TELEMETRY_INFORMATION: 'language-tools 1_check_for_update.yml'
-
-jobs:
- check:
- name: Check for Prisma CLI update
- runs-on: ubuntu-latest
- timeout-minutes: 7
- steps:
- - uses: actions/checkout@v4
- with:
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: Install Dependencies
- run: pnpm install
-
- # First it runs this
- - name: Check for Prisma CLI update
- id: check_update
- run: node scripts/check_for_update.mjs
-
- # ... and depending on the output any (or none) of these 3:
- - name: Invoke bump workflow with inputs for dev
- if: ${{ steps.check_update.outputs.dev_version }}
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 2. Bump versions
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "npm_channel": "dev", "version": "${{ steps.check_update.outputs.dev_version }}" }'
- - name: Invoke bump workflow with inputs for latest
- if: ${{ steps.check_update.outputs.latest_version }}
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 2. Bump versions
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "npm_channel": "latest", "version": "${{ steps.check_update.outputs.latest_version }}" }'
- - name: Invoke bump workflow with inputs for patch-dev
- if: ${{ steps.check_update.outputs.patch-dev_version }}
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 2. Bump versions
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "npm_channel": "patch-dev", "version": "${{ steps.check_update.outputs.patch-dev_version }}" }'
diff --git a/.github/workflows/2_bump_versions.yml b/.github/workflows/2_bump_versions.yml
deleted file mode 100644
index 83e0e0b6b9..0000000000
--- a/.github/workflows/2_bump_versions.yml
+++ /dev/null
@@ -1,97 +0,0 @@
-name: 2. Bump versions
-run-name: 2. Bump versions - CLI ${{ inputs.version }} from ${{ inputs.npm_channel }}
-
-on:
- workflow_dispatch:
- inputs:
- npm_channel:
- description: 'Prisma CLI NPM Channel to bump'
- required: true
- type: choice
- options:
- - latest
- - dev
- - patch-dev
- version:
- description: 'New Prisma CLI version in that channel'
- required: true
-
-concurrency:
- group: version-management
- cancel-in-progress: false
-
-env:
- ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
- PRISMA_TELEMETRY_INFORMATION: 'language-tools 2_bump_versions.yml'
- RELEASE_CHANNEL: ${{ github.event.inputs.npm_channel == 'latest' && 'stable' || 'insider' }}
-
-jobs:
- bump:
- runs-on: ubuntu-latest
- timeout-minutes: 7
- steps:
- - uses: actions/checkout@v4
- with:
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: Install Dependencies
- run: pnpm install
- - name: Setup Git
- run: |
- sh scripts/set_git_credentials.sh
- - name: Print inputs
- run: |
- echo ${{github.event.inputs.npm_channel}}
- echo ${{github.event.inputs.version}}
-
- - name: Update versions file in scripts folder
- run: |
- echo "${{ github.event.inputs.version }}" >scripts/versions/prisma_${{ github.event.inputs.npm_channel }}
-
- if git diff --exit-code; then
- echo "Version has not changed! We should not attempt to bump."
- exit 1
- fi
-
- - name: Update next extension version in scripts folder and output for later use
- id: update # Used to access the calculated next extension version in later steps
- run: node scripts/bump_extension_version.mjs prisma-${{ github.event.inputs.npm_channel }}-release
- - name: Commit and Push
- run: |
- sh scripts/commit_and_push.sh "[skip ci] bump Prisma CLI ${{ github.event.inputs.npm_channel }} version to ${{ github.event.inputs.version }} and extension version to ${{ steps.update.outputs.next_extension_version }} in scripts."
-
- - name: Switch branch
- id: setup_branch
- run: |
- sh scripts/setup_branch.sh ${{ github.event.inputs.npm_channel }}
- - name: Check for minor or major release
- id: is_minor_or_major
- run: |
- VERSION_SCRIPT=$([ -f scripts/is_minor_or_major_release.mjs ] && echo "is_minor_or_major_release.mjs" || echo "is_minor_or_major_release.js")
- node "scripts/$VERSION_SCRIPT" ${{ github.event.inputs.npm_channel }}
- - name: Reset on 'main' branch if minor or major release
- if: ${{steps.is_minor_or_major.outputs.is_minor_or_major_release}}
- run: |
- git reset --hard main
- git push --force origin stable
- - name: Update Prisma CLI version and VS Code extension version
- run: |
- node scripts/update_package_json_files.mjs ${{ github.event.inputs.npm_channel }} ${{ steps.update.outputs.next_extension_version }} ${{ github.event.inputs.version }}
- - name: Install Dependencies to update lock file
- run: pnpm install --frozen-lockfile=false
- - name: Push to branch
- run: |
- sh scripts/commit_and_push.sh "[skip ci] bump extension version to ${{ steps.update.outputs.next_extension_version }} in package.json" ${{ steps.setup_branch.outputs.branch}} ${{ steps.setup_branch.outputs.new_branch }}
-
- - name: Trigger next workflow for Language Server tests
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 3. Test Language Server and publish
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "release_channel": "${{ env.RELEASE_CHANNEL }}", "extension_version": "${{ steps.update.outputs.next_extension_version }}", "branch": "${{steps.setup_branch.outputs.branch}}", "trigger_reason": "Prisma CLI version ${{github.event.inputs.version}}" }'
diff --git a/.github/workflows/3_LS_tests_publish.yml b/.github/workflows/3_LS_tests_publish.yml
deleted file mode 100644
index 61f894fa12..0000000000
--- a/.github/workflows/3_LS_tests_publish.yml
+++ /dev/null
@@ -1,94 +0,0 @@
-name: 3. Test Language Server and publish
-run-name: 3. Test Language Server and publish - ${{ inputs.trigger_reason }}
-
-on:
- workflow_dispatch:
- inputs:
- release_channel:
- description: "Identifies whether we're publishing an insider or stable release of the extension"
- required: true
- type: choice
- options:
- - insider
- - stable
- branch:
- description: 'Branch to run run this workflow on'
- required: true
- extension_version:
- description: 'VS Code extension version. When provided, it will trigger the next workflow to bump the LS version in the extension.'
- trigger_reason:
- description: 'Information about what caused the publishing process in the first place.'
-
-permissions:
- id-token: write # required for OIDC / Trusted Publishers
-
-env:
- PRISMA_TELEMETRY_INFORMATION: 'language-tools 3_LS_unit_tests_publish.yml'
- LS_NPM_CHANNEL: ${{ github.event.inputs.release_channel == 'stable' && 'latest' || 'dev' }}
-
-jobs:
- tests:
- name: Run tests
- runs-on: ${{ matrix.os }}
- timeout-minutes: 10
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- steps:
- - uses: actions/checkout@v4
- with:
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- ref: ${{ github.event.inputs.branch }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: Install Dependencies
- run: pnpm install
- - name: Build Language Server
- run: pnpm --filter @prisma/language-server build
- - name: Run Language Server tests
- run: pnpm --filter @prisma/language-server test
-
- bump:
- name: Bump Language Server version
- needs: [tests]
- runs-on: ubuntu-latest
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v4
- with:
- ref: ${{ github.event.inputs.branch }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: Update npm to support Trusted Publishers
- run: npm install -g npm@^11.5
- - name: Print inputs
- run: |
- echo ${{github.event.inputs.release_channel}}
- echo ${{github.event.inputs.extension_version || 'not provided'}}
- echo ${{github.event.inputs.branch}}
- echo ${{github.event.inputs.trigger_reason || 'not provided'}}
- - name: Install Dependencies
- run: pnpm install
- - name: Typecheck Language Server
- run: pnpm --filter @prisma/language-server typecheck
- - name: Build Language Server
- run: pnpm --filter @prisma/language-server build
- - name: Publish Language Server to npm
- run: pnpm --filter @prisma/language-server publish --tag ${{ env.LS_NPM_CHANNEL }} --access public --no-git-checks
- - name: Trigger next workflow for VS Code e2e tests
- if: ${{ github.event.inputs.extension_version != '' }}
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 4. E2E tests VS Code Extension
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "release_channel": "${{ github.event.inputs.release_channel }}", "extension_version": "${{ github.event.inputs.extension_version }}", "branch": "${{ github.event.inputs.branch }}", "trigger_reason": "${{github.event.inputs.trigger_reason}}" }'
diff --git a/.github/workflows/4_e2e_tests.yml b/.github/workflows/4_e2e_tests.yml
deleted file mode 100644
index d5ffa6ad47..0000000000
--- a/.github/workflows/4_e2e_tests.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-name: 4. E2E tests VS Code Extension
-run-name: 4. E2E tests VS Code Extension - ${{ inputs.trigger_reason }}
-
-on:
- workflow_dispatch:
- inputs:
- release_channel:
- description: "Identifies whether we're publishing an insider or stable release of the extension"
- required: true
- type: choice
- options:
- - insider
- - stable
- extension_version:
- description: 'VS Code extension version'
- required: true
- branch:
- description: 'Branch to run run this workflow on'
- required: true
- trigger_reason:
- description: 'Information about what caused the publishing process in the first place.'
- required: true
-env:
- ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
- PRISMA_TELEMETRY_INFORMATION: 'language-tools 4_e2e_tests.yml'
-
-jobs:
- tests:
- name: E2E tests VS Code Extension
- runs-on: ${{ matrix.os }}
- timeout-minutes: 10
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- steps:
- - uses: actions/checkout@v4
- with:
- ref: ${{ github.event.inputs.branch }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '22'
- cache: 'pnpm'
- - name: Install Dependencies
- run: pnpm install
- - name: Build
- run: pnpm build
- - name: Headless E2E tests
- uses: coactions/setup-xvfb@v1
- with:
- run: pnpm test:e2e
-
- trigger:
- name: Trigger next workflow
- needs: [tests]
- runs-on: ubuntu-latest
- timeout-minutes: 7
- if: always()
- steps:
- - uses: actions/checkout@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- - name: Print inputs
- run: |
- echo ${{github.event.inputs.release_channel}}
- echo ${{github.event.inputs.extension_version}}
- echo ${{github.event.inputs.branch}}
- echo ${{github.event.inputs.trigger_reason}}
- - name: Trigger next workflow to build extension
- if: ${{ needs.tests.result == 'success' }}
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 5. Build extension
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "release_channel": "${{ github.event.inputs.release_channel }}", "extension_version": "${{ github.event.inputs.extension_version }}", "branch": "${{github.event.inputs.branch}}", "trigger_reason": "${{github.event.inputs.trigger_reason}}" }'
diff --git a/.github/workflows/5_build.yml b/.github/workflows/5_build.yml
deleted file mode 100644
index 473b9407ef..0000000000
--- a/.github/workflows/5_build.yml
+++ /dev/null
@@ -1,103 +0,0 @@
-name: 5. Build extension # and upload as release to GitHub
-run-name: 5. Build extension + upload - ${{ inputs.trigger_reason }}
-
-on:
- workflow_dispatch:
- inputs:
- release_channel:
- description: "Identifies whether we're publishing an insider or stable release of the extension"
- required: true
- type: choice
- options:
- - insider
- - stable
- extension_version:
- description: 'VS Code extension version'
- required: true
- branch:
- description: 'Branch to run run this workflow on'
- required: true
- trigger_reason:
- description: 'Information about what caused the publishing process in the first place.'
- required: true
-
-env:
- ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
- PRISMA_TELEMETRY_INFORMATION: 'language-tools 5_build.yml'
-
-jobs:
- build:
- name: Build extension
- runs-on: ubuntu-latest
- timeout-minutes: 7
- outputs:
- tag_name: ${{ steps.names.outputs.tag_name }}
- steps:
- - uses: actions/checkout@v4
- with:
- ref: ${{ github.event.inputs.branch }}
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: Print inputs
- run: |
- echo ${{github.event.inputs.release_channel}}
- echo ${{github.event.inputs.extension_version}}
- echo ${{github.event.inputs.branch}}
- echo ${{github.event.inputs.trigger_reason}}
-
- # Build the extension
- - name: Install Dependencies
- run: pnpm install
- - name: Typecheck all packages
- run: pnpm typecheck
- - name: Build all packages
- run: pnpm build
- - name: Replace Readme for marketplace
- run: node scripts/change_readme.mjs ${{ github.event.inputs.release_channel }}
- - name: Build vsix
- run: cd packages/vscode && pnpm package
-
- # Create GitHub Release and upload built result as asset
- - name: Get git tag and asset name
- id: names
- run: node scripts/get_tag_name.mjs ${{ github.event.inputs.release_channel }} ${{ github.event.inputs.extension_version }}
- - name: create a GitHub release
- id: create_release
- # This action is not maintained since 3+ years!
- # see https://github.com/actions/create-release/issues/119
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ steps.names.outputs.tag_name }}
- release_name: ${{ steps.names.outputs.tag_name }}
- - name: Get asset name for release asset
- id: get_asset_name
- run: |
- echo "asset_name=${{ steps.names.outputs.asset_name }}-${{ github.event.inputs.extension_version }}.vsix" >> "$GITHUB_OUTPUT"
-
- - name: Upload Release Asset
- id: upload-release-asset
- # This action is not maintained since 3+ years!
- # see https://github.com/actions/upload-release-asset/issues/78
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: ${{github.workspace}}/packages/vscode/${{ steps.get_asset_name.outputs.asset_name }}
- asset_name: ${{ steps.get_asset_name.outputs.asset_name }}
- asset_content_type: application/zip
-
- - name: Trigger next workflow to publish extension
- uses: benc-uk/workflow-dispatch@v1
- with:
- workflow: 6. Publish
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- inputs: '{ "asset_name": "${{ steps.get_asset_name.outputs.asset_name }}", "tag_name": "${{ steps.names.outputs.tag_name }}", "trigger_reason": "${{github.event.inputs.trigger_reason}}" }'
diff --git a/.github/workflows/6_publish.yml b/.github/workflows/6_publish.yml
deleted file mode 100644
index 1a72819fca..0000000000
--- a/.github/workflows/6_publish.yml
+++ /dev/null
@@ -1,84 +0,0 @@
-name: 6. Publish
-run-name: 6. Publish - ${{ inputs.trigger_reason }}
-
-on:
- workflow_dispatch:
- inputs:
- asset_name:
- description: 'Name of the .vsix file in the release'
- required: true
- tag_name:
- description: 'The release version/tag to fetch from.'
- required: true
- trigger_reason:
- description: 'Information about what caused the publishing process in the first place.'
- required: true
-
-env:
- ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
- PRISMA_TELEMETRY_INFORMATION: 'language-tools 6_publish.yml'
-
-jobs:
- marketplace:
- name: Publish to marketplace
- runs-on: ubuntu-latest
- timeout-minutes: 7
- steps:
- - uses: actions/checkout@v4
- with:
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: Print inputs
- run: |
- echo ${{github.event.inputs.asset_name}}
- echo ${{github.event.inputs.tag_name}}
- echo ${{github.event.inputs.trigger_reason}}
- - name: Install Dependencies
- run: pnpm install
-
- # Download Asset from GH release and publish to VS Code marketplace
- - uses: dsaltares/fetch-gh-release-asset@master
- with:
- repo: 'prisma/language-tools'
- version: 'tags/${{ github.event.inputs.tag_name }}'
- file: ${{ github.event.inputs.asset_name }}
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
-
- - name: publish vsix to marketplace
- run: cd packages/vscode && npx vsce publish --pat ${{ secrets.AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN}} --packagePath ${{github.workspace}}/${{ github.event.inputs.asset_name }}
-
- open-vsx:
- name: Publish to open-vsx
- runs-on: ubuntu-latest
- timeout-minutes: 7
- steps:
- - uses: actions/checkout@v4
- - name: Install pnpm
- uses: pnpm/action-setup@v4
- - name: Use Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'pnpm'
- - name: Print inputs
- run: |
- echo ${{github.event.inputs.trigger_reason}}
- - name: Install Dependencies
- run: pnpm install
-
- # Download Asset from GH release and publish to open-vsx
- - uses: dsaltares/fetch-gh-release-asset@master
- with:
- repo: 'prisma/language-tools'
- version: 'tags/${{ github.event.inputs.tag_name }}'
- file: ${{ github.event.inputs.asset_name }}
- token: ${{ secrets.PRISMA_BOT_TOKEN }}
-
- - name: Publish vsix to open-vsx.org
- run: cd packages/vscode && npx ovsx --debug publish ${{github.workspace}}/${{ github.event.inputs.asset_name }} --pat ${{ secrets.OPEN_VSX_ACCESS_TOKEN }}
diff --git a/.github/workflows/check_for_prisma_update.yml b/.github/workflows/check_for_prisma_update.yml
new file mode 100644
index 0000000000..66a94e620d
--- /dev/null
+++ b/.github/workflows/check_for_prisma_update.yml
@@ -0,0 +1,83 @@
+name: Check for Prisma CLI update
+
+# Polls npm for new Prisma CLI versions and starts the Release workflow
+# (release.yml) for every channel that has a new version:
+#
+# - dev -> insider release from main
+# - latest -> stable release from the stable branch
+# - patch-dev -> insider release from the x.y.x patch branch
+
+on:
+ # Scheduled trigger disabled: ORM iteration is paused; CLI-update polling
+ # runs on demand. Restore the `schedule:` block below to re-enable.
+ # schedule:
+ # - cron: '*/5 * * * *'
+ workflow_dispatch:
+
+env:
+ ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
+ PRISMA_TELEMETRY_INFORMATION: 'language-tools check_for_prisma_update.yml'
+
+jobs:
+ check:
+ name: Check for Prisma CLI update
+ if: github.repository == 'prisma/language-tools'
+ runs-on: ubuntu-latest
+ timeout-minutes: 7
+ env:
+ GH_TOKEN: ${{ secrets.PRISMA_BOT_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ token: ${{ secrets.PRISMA_BOT_TOKEN }}
+ fetch-depth: 0 # patch branches are created from release tags
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '22'
+ cache: 'pnpm'
+ - name: Install Dependencies
+ run: pnpm install
+
+ - name: Check for Prisma CLI update
+ id: check_update
+ run: node scripts/check_for_update.mjs
+
+ - name: Record new versions
+ if: steps.check_update.outputs.dev_version || steps.check_update.outputs.latest_version || steps.check_update.outputs.patch-dev_version
+ env:
+ DEV_VERSION: ${{ steps.check_update.outputs.dev_version }}
+ LATEST_VERSION: ${{ steps.check_update.outputs.latest_version }}
+ PATCH_DEV_VERSION: ${{ steps.check_update.outputs.patch-dev_version }}
+ run: |
+ sh scripts/set_git_credentials.sh
+ if [ -n "$DEV_VERSION" ]; then echo "$DEV_VERSION" > scripts/versions/prisma_dev; fi
+ if [ -n "$LATEST_VERSION" ]; then echo "$LATEST_VERSION" > scripts/versions/prisma_latest; fi
+ if [ -n "$PATCH_DEV_VERSION" ]; then echo "$PATCH_DEV_VERSION" > scripts/versions/prisma_patch-dev; fi
+ git commit -am "[skip ci] record new Prisma CLI versions"
+ git push
+
+ - name: Release insider (Prisma dev)
+ if: steps.check_update.outputs.dev_version
+ env:
+ DEV_VERSION: ${{ steps.check_update.outputs.dev_version }}
+ run: gh workflow run release.yml --ref main -f channel=insider -f prisma_version="$DEV_VERSION"
+ - name: Release stable (Prisma latest)
+ if: steps.check_update.outputs.latest_version
+ env:
+ LATEST_VERSION: ${{ steps.check_update.outputs.latest_version }}
+ run: gh workflow run release.yml --ref main -f channel=stable -f prisma_version="$LATEST_VERSION"
+ - name: Release insider from patch branch (Prisma patch-dev)
+ if: steps.check_update.outputs.patch-dev_version
+ env:
+ PATCH_DEV_VERSION: ${{ steps.check_update.outputs.patch-dev_version }}
+ run: |
+ BRANCH=$(node scripts/setup_branch.mjs patch-dev)
+ if [ -z "$(git ls-remote --heads origin "$BRANCH")" ]; then
+ # New patch branch: base it on the last marketplace-tested stable release
+ git branch "$BRANCH" "$(cat scripts/versions/tested_extension_stable)"
+ git push origin "$BRANCH"
+ fi
+ gh workflow run release.yml --ref main -f channel=insider -f ref="$BRANCH" -f prisma_version="$PATCH_DEV_VERSION"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000000..4cbcb11658
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,345 @@
+name: Release
+run-name: "Release ${{ github.event_name == 'push' && 'insider (push to main)' || format('{0}{1}', inputs.channel, inputs.prisma_version != '' && format(' — Prisma CLI {0}', inputs.prisma_version) || '') }}"
+
+# The single publishing pipeline for both the insider and the stable extension.
+#
+# - A push to main publishes an insider release.
+# - A manual dispatch publishes an insider or stable release, optionally
+# bumping the Prisma CLI dependencies first (`prisma_version`), optionally
+# from another branch (`ref`, e.g. an x.y.x patch branch).
+# - check_for_prisma_update.yml dispatches this workflow when a new Prisma CLI
+# version is published to npm.
+#
+# The next extension version is derived from the git release tags (`x.y.z` for
+# stable, `insider/x.y.z` for insider), so a release only creates a commit when
+# it actually changes dependencies (`prisma_version` given). All other jobs
+# check out the exact commit resolved by the `plan` job.
+
+on:
+ push:
+ branches:
+ - main
+ paths-ignore:
+ - '.github/**'
+ workflow_dispatch:
+ inputs:
+ channel:
+ description: 'Release channel'
+ required: true
+ type: choice
+ options:
+ - insider
+ - stable
+ default: insider
+ ref:
+ description: 'Branch to release from. Defaults to main for insider and stable for stable. Use an x.y.x branch to patch an older version.'
+ required: false
+ bump:
+ description: "Extension version bump (stable only; 'auto' derives it from the Prisma CLI version)"
+ required: false
+ type: choice
+ options:
+ - auto
+ - patch
+ - minor
+ - major
+ default: auto
+ prisma_version:
+ description: 'Bump the Prisma CLI dependencies to this version before releasing (creates one commit on the release branch)'
+ required: false
+
+concurrency:
+ group: release
+ cancel-in-progress: false
+
+permissions:
+ contents: read
+
+env:
+ ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
+ PRISMA_TELEMETRY_INFORMATION: 'language-tools release.yml'
+ NODE_VERSION: '22'
+
+jobs:
+ plan:
+ name: Plan release
+ if: github.repository == 'prisma/language-tools'
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: write
+ outputs:
+ channel: ${{ steps.params.outputs.channel }}
+ ref: ${{ steps.params.outputs.ref }}
+ sha: ${{ steps.sha.outputs.sha }}
+ version: ${{ steps.version.outputs.version }}
+ tag_name: ${{ steps.version.outputs.tag_name }}
+ asset_name: ${{ steps.version.outputs.asset_name }}
+ npm_channel: ${{ steps.version.outputs.npm_channel }}
+ ls_npm_tag: ${{ steps.version.outputs.ls_npm_tag }}
+ steps:
+ - name: Resolve channel and branch
+ id: params
+ env:
+ EVENT_NAME: ${{ github.event_name }}
+ PUSH_SHA: ${{ github.sha }}
+ INPUT_CHANNEL: ${{ inputs.channel }}
+ INPUT_REF: ${{ inputs.ref }}
+ run: |
+ if [ "$EVENT_NAME" = "push" ]; then
+ CHANNEL=insider
+ REF="$PUSH_SHA"
+ else
+ CHANNEL="$INPUT_CHANNEL"
+ REF="$INPUT_REF"
+ if [ -z "$REF" ]; then
+ if [ "$CHANNEL" = "stable" ]; then REF=stable; else REF=main; fi
+ fi
+ case "$REF" in
+ main | stable) ;;
+ *)
+ if ! echo "$REF" | grep -Eq '^[0-9]+\.[0-9]+\.x$'; then
+ echo "Refusing to release from '$REF'. Releases run from main, stable or an x.y.x patch branch." >&2
+ exit 1
+ fi
+ ;;
+ esac
+ fi
+ {
+ echo "channel=$CHANNEL"
+ echo "ref=$REF"
+ } >> "$GITHUB_OUTPUT"
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ steps.params.outputs.ref }}
+ fetch-depth: 0 # all branches and tags: the next version is derived from release tags
+ token: ${{ secrets.PRISMA_BOT_TOKEN }}
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ cache: 'pnpm'
+ - name: Install Dependencies
+ run: pnpm install
+ - name: Compute next extension version
+ id: version
+ env:
+ CHANNEL: ${{ steps.params.outputs.channel }}
+ BUMP: ${{ inputs.bump || 'auto' }}
+ PRISMA_VERSION: ${{ inputs.prisma_version }}
+ run: node scripts/next_extension_version.mjs "$CHANNEL" "$BUMP" "$PRISMA_VERSION"
+ - name: Reset stable branch to main (new Prisma minor/major)
+ if: steps.params.outputs.channel == 'stable' && inputs.prisma_version != '' && steps.version.outputs.release_type != 'patch'
+ run: |
+ git checkout -B stable origin/main
+ git push --force origin stable
+ - name: Bump Prisma dependencies
+ if: inputs.prisma_version != ''
+ env:
+ NPM_CHANNEL: ${{ steps.version.outputs.npm_channel }}
+ VERSION: ${{ steps.version.outputs.version }}
+ PRISMA_VERSION: ${{ inputs.prisma_version }}
+ RELEASE_REF: ${{ steps.params.outputs.ref }}
+ run: |
+ node scripts/update_package_json_files.mjs "$NPM_CHANNEL" "$VERSION" "$PRISMA_VERSION"
+ sh scripts/set_git_credentials.sh
+ git commit -am "[skip ci] bump Prisma CLI to $PRISMA_VERSION and extension to $VERSION"
+ git push origin "HEAD:$RELEASE_REF"
+ - name: Resolve release commit
+ id: sha
+ run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
+
+ test:
+ name: Test (${{ matrix.os }})
+ needs: [plan]
+ runs-on: ${{ matrix.os }}
+ timeout-minutes: 25
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ needs.plan.outputs.sha }}
+ persist-credentials: false
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ cache: 'pnpm'
+ - name: Install Dependencies
+ run: pnpm install
+ - name: Build all packages
+ run: pnpm build
+ - name: Typecheck all packages
+ run: pnpm typecheck
+ - name: Run Language Server tests
+ run: pnpm --filter @prisma/language-server test
+ - name: Headless E2E tests
+ uses: coactions/setup-xvfb@v1
+ with:
+ run: pnpm test:e2e
+
+ publish-language-server:
+ name: Publish Language Server to npm
+ needs: [plan, test]
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: read
+ id-token: write
+ env:
+ NPM_CHANNEL: ${{ needs.plan.outputs.npm_channel }}
+ VERSION: ${{ needs.plan.outputs.version }}
+ LS_NPM_TAG: ${{ needs.plan.outputs.ls_npm_tag }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ needs.plan.outputs.sha }}
+ persist-credentials: false
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ cache: 'pnpm'
+ - name: Update npm to support Trusted Publishers
+ run: npm install -g npm@^11.5
+ - name: Install Dependencies
+ run: pnpm install
+ - name: Set Language Server version
+ run: node scripts/update_package_json_files.mjs "$NPM_CHANNEL" "$VERSION" ""
+ - name: Build Language Server
+ run: pnpm --filter @prisma/language-server build
+ - name: Publish Language Server to npm
+ run: pnpm --filter @prisma/language-server publish --tag "$LS_NPM_TAG" --access public --no-git-checks
+
+ package:
+ name: Build extension
+ needs: [plan, test]
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ env:
+ CHANNEL: ${{ needs.plan.outputs.channel }}
+ NPM_CHANNEL: ${{ needs.plan.outputs.npm_channel }}
+ VERSION: ${{ needs.plan.outputs.version }}
+ ASSET_FILE: ${{ needs.plan.outputs.asset_name }}-${{ needs.plan.outputs.version }}.vsix
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ needs.plan.outputs.sha }}
+ persist-credentials: false
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ cache: 'pnpm'
+ - name: Install Dependencies
+ run: pnpm install
+ - name: Set extension name and version
+ run: node scripts/update_package_json_files.mjs "$NPM_CHANNEL" "$VERSION" ""
+ - name: Replace Readme for marketplace
+ run: node scripts/change_readme.mjs "$CHANNEL"
+ - name: Build all packages
+ run: pnpm build
+ - name: Build vsix
+ run: cd packages/vscode && pnpm package
+ - name: Upload vsix as workflow artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: vsix
+ path: packages/vscode/${{ env.ASSET_FILE }}
+ if-no-files-found: error
+
+ release:
+ name: Create GitHub release
+ needs: [plan, package]
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: write
+ env:
+ CHANNEL: ${{ needs.plan.outputs.channel }}
+ TAG_NAME: ${{ needs.plan.outputs.tag_name }}
+ ASSET_FILE: ${{ needs.plan.outputs.asset_name }}-${{ needs.plan.outputs.version }}.vsix
+ SHA: ${{ needs.plan.outputs.sha }}
+ GH_TOKEN: ${{ github.token }}
+ GH_REPO: ${{ github.repository }}
+ steps:
+ - name: Download vsix artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: vsix
+ - name: Create GitHub release
+ run: |
+ PRERELEASE=""
+ if [ "$CHANNEL" = "insider" ]; then PRERELEASE="--prerelease"; fi
+ gh release create "$TAG_NAME" "$ASSET_FILE" \
+ --title "$TAG_NAME" \
+ --target "$SHA" \
+ $PRERELEASE
+
+ publish-marketplace:
+ name: Publish to VS Code Marketplace
+ needs: [plan, release]
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ env:
+ ASSET_FILE: ${{ needs.plan.outputs.asset_name }}-${{ needs.plan.outputs.version }}.vsix
+ VSCE_PAT: ${{ secrets.AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ needs.plan.outputs.sha }}
+ persist-credentials: false
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ cache: 'pnpm'
+ - name: Install Dependencies
+ run: pnpm install
+ - name: Download vsix artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: vsix
+ - name: Publish vsix to marketplace
+ run: cd packages/vscode && npx vsce publish --packagePath "$GITHUB_WORKSPACE/$ASSET_FILE"
+
+ publish-open-vsx:
+ name: Publish to open-vsx
+ needs: [plan, release]
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ env:
+ ASSET_FILE: ${{ needs.plan.outputs.asset_name }}-${{ needs.plan.outputs.version }}.vsix
+ OVSX_PAT: ${{ secrets.OPEN_VSX_ACCESS_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ needs.plan.outputs.sha }}
+ persist-credentials: false
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ cache: 'pnpm'
+ - name: Install Dependencies
+ run: pnpm install
+ - name: Download vsix artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: vsix
+ - name: Publish vsix to open-vsx.org
+ run: cd packages/vscode && npx ovsx --debug publish "$GITHUB_WORKSPACE/$ASSET_FILE"
diff --git a/README.md b/README.md
index e1b9564c7a..bc124ffda0 100644
--- a/README.md
+++ b/README.md
@@ -56,10 +56,10 @@ Press `F5` in VS Code to launch the extension in debug mode.
## Build Status
-[![E2E tests before Insider release][e2e-insider-badge]][e2e-insider-action]
-[![Language Server tests][ls-tests-badge]][ls-tests-action]
+[![Release][release-badge]][release-action]
+[![CI][ci-badge]][ci-action]
-[e2e-insider-badge]: https://github.com/prisma/language-tools/workflows/5.%20Integration%20tests%20in%20VSCode%20folder%20with%20published%20LS/badge.svg?branch=main
-[e2e-insider-action]: https://github.com/prisma/language-tools/actions/workflows/5_e2e_tests.yml?query=branch%3Amain
-[ls-tests-badge]: https://github.com/prisma/language-tools/workflows/3.%20Unit%20tests%20for%20LS%20and%20publish/badge.svg?branch=main
-[ls-tests-action]: https://github.com/prisma/language-tools/actions/workflows/3_LS_tests_publish.yml?query=branch%3Amain
+[release-badge]: https://github.com/prisma/language-tools/actions/workflows/release.yml/badge.svg?branch=main
+[release-action]: https://github.com/prisma/language-tools/actions/workflows/release.yml?query=branch%3Amain
+[ci-badge]: https://github.com/prisma/language-tools/actions/workflows/continuous-integration.yml/badge.svg?branch=main
+[ci-action]: https://github.com/prisma/language-tools/actions/workflows/continuous-integration.yml?query=branch%3Amain
diff --git a/docs/architecture.md b/docs/architecture.md
index 55822ad18d..a0dd696b33 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -69,9 +69,10 @@ assets (`pglite.data`, `pglite.wasm`) are copied separately
⁴ Kept separate to support runtime switching between Prisma 6 and latest
language servers via the `prisma.pinToPrisma6` setting
-> **Note:** These dependencies are automatically updated via CI. A cron job
-> runs every 5 minutes checking for new Prisma releases
-> (see `.github/workflows/1_check_for_updates.yml`).
+> **Note:** These dependencies are updated via CI by
+> `.github/workflows/check_for_prisma_update.yml`, which checks npm for new
+> Prisma CLI releases and dispatches `release.yml`. Its cron schedule is
+> currently disabled; dispatch it manually. See [CI/CD](ci-cd.md).
## File Organization
diff --git a/docs/ci-cd.md b/docs/ci-cd.md
index f673494e7c..2af4cd9184 100644
--- a/docs/ci-cd.md
+++ b/docs/ci-cd.md
@@ -1,36 +1,99 @@
# CI/CD Overview
-The repository has extensive GitHub Actions workflows:
-
-| Workflow | Trigger | Purpose |
-| ------------------------- | ------------------ | ------------------------------ |
-| `1_check_for_updates.yml` | Every 5 min (cron) | Checks for new Prisma releases |
-| `2_bump_versions.yml` | Triggered by #1 | Bumps Prisma dependencies |
-| `3_LS_tests_publish.yml` | On version bump | Tests and publishes LS to npm |
-| `4_e2e_tests.yml` | Before releases | Runs E2E tests |
-| `5_build.yml` | After E2E pass | Builds extension |
-| `6_publish.yml` | After build | Publishes VS Code extension |
-| `PR_build_extension.yml` | On PRs | Builds `.vsix` for testing |
+## Publishing pipeline
+
+All publishing — insider **and** stable — happens in a single workflow:
+[`release.yml`](../.github/workflows/release.yml). There are no chained
+workflows and no version-bump commits: the next extension version is derived
+from the git release tags (`x.y.z` for stable, `insider/x.y.z` for insider,
+one shared monotonic counter). The only commit a release can create is a real
+dependency bump when a new Prisma CLI version is passed in.
+
+### Triggers
+
+| Trigger | Result |
+| ---------------------------------------------- | ------------------------------------------------------------------------- |
+| Push to `main` | Insider release |
+| Manual `workflow_dispatch` | Insider or stable release, optional Prisma CLI bump, optional branch |
+| `check_for_prisma_update.yml` (cron, disabled) | Dispatches `release.yml` when a new Prisma CLI version is released on npm |
+
+### Jobs
```mermaid
graph TD
- A(Cron every 5 minutes) --> B[1. Check for Prisma CLI Update]
- B -->|update available?| C[2. Bump versions]
- C -->D{Which NPM channel was updated?}
- D -->|dev or patch-dev| E((Our release_channel is insider))
- D -->|latest| F((Our release_channel is stable))
- E --> G[3. Test Language Server and publish]
- F --> G
- G -->|tests and publish successful?| I[4. E2E tests VS Code Extension]
- I -->|tests pass?| J[5. Build extension]
- J --> K[6. Publish]
-
- L(Commit in the extension) --> M[1/2. Bump versions for extension only]
- M -->E
- N(Manual workflow dispatch) --> O[1/2. Bump and release a stable version of the extension]
- O -->F
+ PUSH(Push to main) --> PLAN
+ MANUAL(Manual dispatch: channel, bump, prisma_version) --> PLAN
+ CRON(check_for_prisma_update.yml cron) --> PLAN
+
+ subgraph release.yml
+ PLAN[plan: resolve channel + branch, derive next version from git tags,
optionally commit Prisma CLI dependency bump]
+ PLAN --> TEST[test: build, typecheck, LS unit tests, E2E tests
on ubuntu / macos / windows]
+ TEST --> LS[publish-language-server:
npm publish with dist-tag dev or latest]
+ TEST --> PKG[package: build vsix, upload artifact]
+ PKG --> REL[release: download artifact,
create GitHub release + tag]
+ REL --> MKT[publish-marketplace: vsce publish]
+ REL --> OVSX[publish-open-vsx: ovsx publish]
+ end
```
+- **plan** resolves the release channel (`insider`/`stable`), the branch, and
+ the next version, and outputs a single commit SHA that every later job
+ checks out — no state is passed through commits mid-pipeline.
+- **test** gates publishing: build, typecheck, Language Server unit tests and
+ VS Code E2E tests on all three OSes.
+- **package** builds the `.vsix` once; the same file is attached to the GitHub
+ release and published to both marketplaces (passed as a workflow artifact).
+- **release** only downloads that artifact and creates the tag and GitHub
+ release. It does not check out, install or build anything.
+- Insider GitHub releases are marked as pre-releases, so the repository's
+ "latest release" always points to a stable version.
+
+### Permissions
+
+The workflow default is `contents: read`. Write access is granted per job:
+`plan` (pushes the dependency-bump commit and can reset `stable`), `release`
+(creates the tag and GitHub release) and `publish-language-server`
+(`id-token: write` for npm Trusted Publishers). Every checkout except `plan`'s
+sets `persist-credentials: false`, so build and test steps never see a git
+credential.
+
+Releases only run from `main`, `stable` or an `x.y.x` patch branch; `plan`
+rejects any other `ref`.
+
+### Channels and branches
+
+| Channel | Branch | Extension name | LS npm dist-tag |
+| ------- | --------------- | ---------------- | --------------- |
+| insider | `main` | `prisma-insider` | `dev` |
+| stable | `stable` | `prisma` | `latest` |
+| insider | `x.y.x` patches | `prisma-insider` | `dev` |
+
+The `stable` branch pins the Prisma CLI `latest` dependencies while `main`
+tracks `dev`. When a stable release ships a new Prisma minor or major, the
+`plan` job resets `stable` to `main`. Patch releases for older versions are
+made by dispatching `release.yml` with an `x.y.x` branch as `ref`
+(channel `insider` for a `patch-dev` CLI, `stable` for the final patch).
+
+### Prisma CLI update automation
+
+[`check_for_prisma_update.yml`](../.github/workflows/check_for_prisma_update.yml)
+(cron, currently disabled — dispatch manually) compares the npm versions of
+`prisma@dev`, `prisma@latest` and `prisma@patch-dev` against
+`scripts/versions/prisma_*`, records new versions there, and dispatches
+`release.yml` for each channel that changed.
+
+## Other workflows
+
+| Workflow | Trigger | Purpose |
+| -------------------------------------- | ------------------- | -------------------------------------------- |
+| `continuous-integration.yml` | PRs, push to main | Tests, lint, typecheck, Playwright |
+| `PR_build_extension.yml` | PRs | Builds a `.vsix` artifact for manual testing |
+| `e2e_check_for_new_published_vsix.yml` | Cron (disabled) | Detects new marketplace releases |
+| `e2e_published_vsix.yml` | Dispatched by above | E2E tests against the published extension |
+| `codeql-analysis.yml` | PRs, push, cron | CodeQL security analysis |
+| `pr-code-security.yml` | PRs | Security checks |
+| `update-api-types.yml` | Cron / manual | Updates generated API types |
+
## Testing PR Builds
When you open a PR, the `PR_build_extension.yml` workflow automatically builds a
diff --git a/packages/vscode/CONTRIBUTING.md b/packages/vscode/CONTRIBUTING.md
index 3a376e2dfd..59289474d1 100644
--- a/packages/vscode/CONTRIBUTING.md
+++ b/packages/vscode/CONTRIBUTING.md
@@ -94,16 +94,16 @@ For releases that don't coincide with a Prisma ORM release:
**Insider release:**
-- Push to `main` or a patch branch (e.g., `35.0.x`)
-- Automatically triggers [`1/2. Bump versions for extension only`][bump-workflow]
+- Push to `main`, which triggers [`Release`][release-workflow]
+- For a patch branch (e.g. `35.0.x`), dispatch [`Release`][release-workflow]
+ with channel `insider` and that branch as `ref`
**Stable release:**
-- Manually trigger [`1/2. Bump and release a stable version`][stable-workflow]
-- Select release type: `patch`, `minor`, or `major`
+- Manually dispatch [`Release`][release-workflow] with channel `stable`
+- Select the bump: `auto`, `patch`, `minor` or `major`
-[bump-workflow]: ../../.github/workflows/1_2_bump_extension_only.yml
-[stable-workflow]: ../../.github/workflows/1_2_stable_extension_release.yml
+[release-workflow]: ../../.github/workflows/release.yml
## Dependencies
diff --git a/scripts/__tests__/__snapshots__/change-readme.test.js.snap b/scripts/__tests__/__snapshots__/change-readme.test.js.snap
deleted file mode 100644
index a711740514..0000000000
--- a/scripts/__tests__/__snapshots__/change-readme.test.js.snap
+++ /dev/null
@@ -1,207 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`changeReadme it should with an insider release 1`] = `
-"