Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Prepare release PR
on:
workflow_dispatch:
inputs:
version:
description: Stable X.Y.Z version or patch, minor, major
type: string
required: true
permissions: {}
concurrency:
group: prepare-release-pr
cancel-in-progress: false
jobs:
prepare:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: release
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: main
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
- name: Prepare versions
id: version
env:
REQUESTED_VERSION: ${{ inputs.version }}
run: |
npm version "$REQUESTED_VERSION" --no-git-tag-version --ignore-scripts --package-lock=false
echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
- name: Open release PR
id: pr
uses: marimo-team/internal-gh-actions/release-pr@3a52681ab8e200a34175ec8e5d14985e4e7ce3c3
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
manifest: package.json
version: ${{ steps.version.outputs.version }}
files: |
package.json
- name: Link release PR
env:
PR_URL: ${{ steps.pr.outputs.url }}
run: |
echo "$PR_URL" >> "$GITHUB_STEP_SUMMARY"
36 changes: 36 additions & 0 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tag merged release
on:
pull_request:
types: [closed]
branches: [main]
permissions: {}
jobs:
tag:
if: >-
github.event.pull_request.merged == true &&
github.event.pull_request.head.repo.full_name == github.repository &&
startsWith(github.event.pull_request.head.ref, 'release/') &&
startsWith(github.event.pull_request.title, 'release: ')
runs-on: ubuntu-latest
environment: release
timeout-minutes: 60
concurrency:
group: release-tag-${{ github.event.pull_request.number }}
cancel-in-progress: false
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
- name: Tag merged release
uses: marimo-team/internal-gh-actions/release-tag@3a52681ab8e200a34175ec8e5d14985e4e7ce3c3
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
manifest: package.json
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- name: Validate release tag
if: startsWith(github.ref, 'refs/tags/')
uses: marimo-team/internal-gh-actions/validate-release@3a52681ab8e200a34175ec8e5d14985e4e7ce3c3
with:
manifest: package.json

- name: ⎔ Setup pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
Expand Down Expand Up @@ -123,9 +129,9 @@ jobs:
runs-on: "${{ vars.CI_RUNNER_SMALL || 'ubuntu-latest' }}"
steps:
- name: 📣 Notify release result
uses: marimo-team/internal-gh-actions/release-notification@91f15bebd3f322db6717ba5a17983928a47ec991 # main
uses: marimo-team/internal-gh-actions/release-notification@3a52681ab8e200a34175ec8e5d14985e4e7ce3c3
with:
status: ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 'failure' || 'success' }}
results: ${{ toJSON(needs) }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_RELEASES }}
artifact-url: "https://npmjs.com/package/@marimo-team/codemirror-languageserver"
permissions:
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ pnpm run dev # vite dev server
```

- Licensed BSD-3-Clause (inherited from the upstream fork), unlike the Apache-2.0 sibling repos.
- Release: pushing a `v*` tag triggers release.yml, which publishes to npm via OIDC.
- Release: `./scripts/release.sh patch` requests a release PR; see [RELEASING.md](RELEASING.md).
10 changes: 2 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,9 @@ Types:
- test: Adding or updating tests
- chore: Changes to build process or auxiliary tools

## Release Process
## Releases

For maintainers only:

```bash
git checkout main
git pull
npx bumpp --no-git-check=false
```
See [Releases](RELEASING.md) to request, review, and publish a version through a release PR.

## Questions?

Expand Down
41 changes: 41 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Releases

A merged `release/X.Y.Z` PR approves a release.
The release App creates an annotated `vX.Y.Z` tag at the merge commit.
The tag starts the existing publishing workflow.

## Request a release

1. Run this command with an authenticated GitHub CLI:

```sh
pnpm release patch
```

Use `minor`, `major`, or a stable `X.Y.Z` version instead of `patch` when needed.
The command dispatches `release-pr.yml` on `main`.

2. Ask another `marimo-eng` member to approve the `release` environment request.
3. Review the version changes and CI results in the generated PR.
4. Merge the PR with its `release/X.Y.Z` branch and `release: X.Y.Z` title intact.
5. Ask another `marimo-eng` member to approve the tagging workflow's environment request.
6. Monitor the tagging and publishing workflows in GitHub Actions.

Repository writers can request a release.
The protected environment requires a different `marimo-eng` reviewer for each workflow run.
Repository rules control who can merge the PR.
The App key belongs only to the `release` environment, which permits `main` deployments.

## Retry

If preparation fails because `main` advanced, dispatch it again.
If the release branch already has different changes, inspect the existing PR before continuing.
The workflow does not overwrite conflicting branches or tags.

If tagging fails, rerun the failed tagging workflow after correcting the cause.
If publication fails, rerun the failed publisher jobs.
An existing tag at the same commit is safe to reuse.
A published version or tag must never move to another commit.

The shared [release actions](https://github.com/marimo-team/internal-gh-actions#release-actions)
own PR creation, tag creation, and release identity checks.
143 changes: 73 additions & 70 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,76 @@
{
"name": "@marimo-team/codemirror-languageserver",
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"version": "2.0.1",
"description": "Language Server Plugin for CodeMirror 6",
"files": ["dist"],
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
"scripts": {
"prepare": "tsc",
"dev": "vite",
"build": "tsc",
"build:demo": "vite build",
"build:ty-wasm": "bash scripts/build-ty-wasm.sh",
"lint": "biome check --write",
"lint:ci": "biome check",
"typecheck": "tsc --noEmit",
"preview": "vite preview",
"test": "vitest"
},
"homepage": "https://github.com/marimo-team/codemirror-languageserver",
"bugs": {
"url": "https://github.com/marimo-team/codemirror-languageserver/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/marimo-team/codemirror-languageserver.git"
},
"license": "BSD-3-Clause",
"packageManager": "pnpm@10.34.5",
"peerDependencies": {
"@codemirror/autocomplete": "^6",
"@codemirror/lint": "^6",
"@codemirror/state": "^6",
"@codemirror/view": "^6"
},
"devDependencies": {
"@astral-sh/ruff-wasm-web": "0.15.20",
"@biomejs/biome": "1.9.4",
"@codemirror/autocomplete": "6.20.3",
"@codemirror/lang-javascript": "6.2.5",
"@codemirror/lang-python": "6.2.1",
"@codemirror/language": "6.12.4",
"@codemirror/lint": "6.9.7",
"@codemirror/state": "6.7.6",
"@codemirror/view": "6.43.13",
"@lezer/highlight": "1.2.3",
"@typescript/vfs": "1.6.4",
"@vitest/coverage-v8": "4.1.11",
"codemirror": "6.0.2",
"jsdom": "26.1.0",
"typescript": "5.9.3",
"vite": "6.4.3",
"vitest": "4.1.11"
},
"dependencies": {
"marked": "^15.0.6",
"vscode-languageserver-protocol": "^3.17.5"
"name": "@marimo-team/codemirror-languageserver",
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"version": "2.0.1",
"description": "Language Server Plugin for CodeMirror 6",
"files": [
"dist"
],
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
"scripts": {
"prepare": "tsc",
"dev": "vite",
"build": "tsc",
"build:demo": "vite build",
"build:ty-wasm": "bash scripts/build-ty-wasm.sh",
"lint": "biome check --write",
"lint:ci": "biome check",
"typecheck": "tsc --noEmit",
"preview": "vite preview",
"test": "vitest",
"release": "bash scripts/release.sh"
},
"homepage": "https://github.com/marimo-team/codemirror-languageserver",
"bugs": {
"url": "https://github.com/marimo-team/codemirror-languageserver/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/marimo-team/codemirror-languageserver.git"
},
"license": "BSD-3-Clause",
"packageManager": "pnpm@10.34.5",
"peerDependencies": {
"@codemirror/autocomplete": "^6",
"@codemirror/lint": "^6",
"@codemirror/state": "^6",
"@codemirror/view": "^6"
},
"devDependencies": {
"@astral-sh/ruff-wasm-web": "0.15.20",
"@biomejs/biome": "1.9.4",
"@codemirror/autocomplete": "6.20.3",
"@codemirror/lang-javascript": "6.2.5",
"@codemirror/lang-python": "6.2.1",
"@codemirror/language": "6.12.4",
"@codemirror/lint": "6.9.7",
"@codemirror/state": "6.7.6",
"@codemirror/view": "6.43.13",
"@lezer/highlight": "1.2.3",
"@typescript/vfs": "1.6.4",
"@vitest/coverage-v8": "4.1.11",
"codemirror": "6.0.2",
"jsdom": "26.1.0",
"typescript": "5.9.3",
"vite": "6.4.3",
"vitest": "4.1.11"
},
"dependencies": {
"marked": "^15.0.6",
"vscode-languageserver-protocol": "^3.17.5"
}
}
11 changes: 11 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ "$#" != 1 || "$1" == -h || "$1" == --help ]]; then
printf 'Usage: %s <patch|minor|major|X.Y.Z>\n' "$0" >&2
exit 2
fi
if [[ ! "$1" =~ ^(patch|minor|major|(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*))$ ]]; then
printf 'Expected patch, minor, major, or a stable X.Y.Z version.\n' >&2
exit 2
fi
exec gh workflow run release-pr.yml --repo marimo-team/codemirror-languageserver --ref main -f "version=$1"
Loading