Repository navigation
fix(language-server): retain diagnostics in real VS Code overlay host… #131
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: Release | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| channel: | |
| description: npm release channel | |
| required: true | |
| default: beta | |
| type: choice | |
| options: | |
| - beta | |
| - rc | |
| - stable | |
| evidence_run_id: | |
| description: Successful CI workflow_dispatch run for this commit (required for rc/stable) | |
| required: false | |
| type: string | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| version: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6 | |
| with: | |
| version: 10.32.1 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 22.14 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - id: pending_changesets | |
| name: Detect pending changesets | |
| run: node scripts/detect-pending-changesets.mjs >> "$GITHUB_OUTPUT" | |
| - uses: changesets/action/version@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2 | |
| if: steps.pending_changesets.outputs.present == 'true' | |
| with: | |
| script: pnpm version-packages | |
| publish: | |
| if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| permissions: | |
| actions: read | |
| contents: write | |
| id-token: write | |
| security-events: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6 | |
| with: | |
| version: 10.32.1 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| - run: npm install --global npm@12.0.2 | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm release:exceptions:check | |
| - run: pnpm verify | |
| - run: pnpm release:artifacts | |
| - if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: typed-sql-release-artifacts-${{ inputs.channel }}-${{ github.run_attempt }} | |
| path: artifacts/release/artifacts.json | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - run: pnpm e2e:packed | |
| env: | |
| TYPED_SQL_CONTAINER_ENGINE: docker | |
| - run: pnpm audit --prod --audit-level high | |
| - name: Assert CodeQL release policy | |
| run: pnpm release:security | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Record release-local evidence | |
| run: >- | |
| node scripts/write-ci-evidence.mjs | |
| --lane release | |
| --output artifacts/release/local-evidence.json | |
| --gate quality | |
| --gate typecheck | |
| --gate unit | |
| --gate soundness | |
| --gate api | |
| --gate packed-consumer | |
| --gate conformance-smoke | |
| --gate performance | |
| --gate soak | |
| --gate artifact-integrity | |
| --gate vulnerability-audit | |
| --gate security-review | |
| - name: Require comprehensive CI evidence | |
| if: (inputs.channel == 'rc' || inputs.channel == 'stable') && inputs.evidence_run_id == '' | |
| run: | | |
| echo "rc and stable releases require evidence_run_id from a successful CI workflow_dispatch run" | |
| exit 1 | |
| - name: Download comprehensive CI evidence | |
| if: inputs.channel == 'rc' || inputs.channel == 'stable' | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| github-token: ${{ github.token }} | |
| run-id: ${{ inputs.evidence_run_id }} | |
| pattern: typed-sql-release-candidate-evidence-* | |
| path: artifacts/release/external | |
| merge-multiple: true | |
| - name: Assert beta release contract | |
| if: inputs.channel == 'beta' | |
| run: pnpm release:assert beta && pnpm release:evidence:policy beta | |
| - name: Assert release-candidate contract | |
| if: inputs.channel == 'rc' | |
| run: pnpm release:assert rc && pnpm release:evidence:policy rc | |
| - name: Assert stable release contract | |
| if: inputs.channel == 'stable' | |
| run: pnpm release:assert stable && pnpm release:evidence:policy stable | |
| - name: Record stable governance evidence | |
| if: inputs.channel == 'stable' | |
| run: >- | |
| node scripts/write-ci-evidence.mjs | |
| --lane stable-governance | |
| --output artifacts/release/stable-evidence.json | |
| --gate source-candidate | |
| --gate security-review | |
| --gate provenance | |
| --gate partial-publication-retry | |
| --gate promotion-record | |
| - name: Assemble beta release evidence | |
| if: inputs.channel == 'beta' | |
| run: >- | |
| pnpm release:evidence:assemble -- | |
| --output artifacts/release/evidence.json | |
| --input artifacts/release/local-evidence.json | |
| - name: Assemble release-candidate evidence | |
| if: inputs.channel == 'rc' | |
| run: >- | |
| pnpm release:evidence:assemble -- | |
| --output artifacts/release/evidence.json | |
| --input artifacts/release/local-evidence.json | |
| --input artifacts/release/external/candidate.json | |
| - name: Assemble complete stable evidence | |
| if: inputs.channel == 'stable' | |
| run: >- | |
| pnpm release:evidence:assemble -- | |
| --require-complete | |
| --output artifacts/release/evidence.json | |
| --input artifacts/release/local-evidence.json | |
| --input artifacts/release/external/candidate.json | |
| --input artifacts/release/stable-evidence.json | |
| - name: Retain release evidence | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: typed-sql-release-evidence-${{ inputs.channel }}-${{ github.run_attempt }} | |
| path: artifacts/release/evidence.json | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Publish experimental companions | |
| if: inputs.channel == 'stable' | |
| run: pnpm release:companions | |
| - id: stable_registry_source | |
| name: Resolve stable registry source | |
| if: inputs.channel == 'stable' | |
| run: node scripts/resolve-stable-registry-source.mjs >> "$GITHUB_OUTPUT" | |
| - name: Verify registry-only release candidate | |
| if: inputs.channel == 'stable' | |
| run: pnpm e2e:registry | |
| env: | |
| TYPED_SQL_CONTAINER_ENGINE: docker | |
| TYPED_SQL_REGISTRY_EXPECTED: ${{ steps.stable_registry_source.outputs.expected }} | |
| TYPED_SQL_REGISTRY_TAG: ${{ steps.stable_registry_source.outputs.tag }} | |
| TYPED_SQL_REGISTRY_PREVIEW_TAG: next | |
| - name: Publish beta | |
| uses: changesets/action/publish@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2 | |
| if: inputs.channel == 'beta' | |
| with: | |
| script: pnpm release:beta | |
| create-github-releases: true | |
| push-git-tags: true | |
| - name: Publish release candidate | |
| uses: changesets/action/publish@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2 | |
| if: inputs.channel == 'rc' | |
| with: | |
| script: pnpm release:rc | |
| create-github-releases: true | |
| push-git-tags: true | |
| - name: Verify published prerelease from npm | |
| if: inputs.channel == 'beta' || inputs.channel == 'rc' | |
| run: pnpm e2e:registry | |
| env: | |
| TYPED_SQL_CONTAINER_ENGINE: docker | |
| TYPED_SQL_REGISTRY_EXPECTED: workspace | |
| TYPED_SQL_REGISTRY_TAG: next | |
| TYPED_SQL_REGISTRY_PREVIEW_TAG: next | |
| - name: Publish stable | |
| uses: changesets/action/publish@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2 | |
| if: inputs.channel == 'stable' | |
| with: | |
| script: pnpm release:stable | |
| create-github-releases: true | |
| push-git-tags: true | |
| - name: Verify published stable packages from npm | |
| if: inputs.channel == 'stable' | |
| run: pnpm e2e:registry | |
| env: | |
| TYPED_SQL_CONTAINER_ENGINE: docker | |
| TYPED_SQL_REGISTRY_EXPECTED: workspace | |
| TYPED_SQL_REGISTRY_TAG: latest | |
| TYPED_SQL_REGISTRY_PREVIEW_TAG: next | |
| - name: Publish aggregate stable release notes | |
| if: inputs.channel == 'stable' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| release_series="$(node -p "require('./release-manifest.json').series")" | |
| release_tag="v${release_series}" | |
| notes_file=".github/release-notes/${release_series}.md" | |
| if gh release view "${release_tag}" >/dev/null 2>&1; then | |
| echo "${release_tag} already exists; preserving the published release." | |
| else | |
| gh release create "${release_tag}" --target "${GITHUB_SHA}" --title "typed-sql ${release_series}" --notes-file "${notes_file}" | |
| fi |