Skip to content

Commit 04da33a

Browse files
ci: three release lines, main, mcp and lms
A version with -mcp. or -lms. becomes a prerelease on GitHub and goes to npm under the dist-tag of its line, main stays latest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 56fd863 commit 04da33a

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

‎.github/workflows/create-release.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
with:
4040
tag_name: ${{ github.ref_type == 'tag' && github.ref_name || steps.version.outputs.tag }}
4141
target_commitish: ${{ github.sha }}
42-
prerelease: ${{ github.ref_type != 'tag' }}
42+
# three lines: main is the release, a version with -mcp. or -lms. a prerelease of its branch
43+
prerelease: ${{ github.ref_type != 'tag' || contains(steps.version.outputs.tag, '-mcp.') || contains(steps.version.outputs.tag, '-lms.') }}
4344
body: |
4445
Download your OS specific binary from below
4546
files: |

‎.github/workflows/npm-publish.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@ jobs:
3333
env:
3434
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_KEY }}
3535

36+
# the dist-tag follows the version: 1.5.0-mcp.1--2.7.0 is @mcp, -lms. is @lms, else latest
37+
- name: Channel
38+
id: channel
39+
run: |
40+
case "$(node -p "require('./package.json').version")" in
41+
*-mcp.*) echo "tag=mcp" >> "$GITHUB_OUTPUT" ;;
42+
*-lms.*) echo "tag=lms" >> "$GITHUB_OUTPUT" ;;
43+
*) echo "tag=latest" >> "$GITHUB_OUTPUT" ;;
44+
esac
45+
3646
- name: Publish to npm
37-
run: npm publish --access public --tag latest
47+
run: npm publish --access public --tag ${{ steps.channel.outputs.tag }}
3848
env:
3949
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_KEY }}

‎CLAUDE.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ Pushing a git tag triggers two independent GitHub Actions workflows (`.github/wo
4848
- Builds standalone binaries with `@yao-pkg/pkg` (Node 22, `vercel/pkg` stops at 18, too old for hammerhead) for win/linux/macos (`npm run release_*`) and attaches them to a GitHub Release
4949
- Publishes the npm package (`npm run build` then `npm publish`)
5050

51+
Three lines, each tagged on its own branch (the workflows run from the tagged commit): `main` is the release
52+
(`1.4.0--2.7.0`, npm `latest`), `mcp` and `lms` are prereleases with `-mcp.<n>` or `-lms.<n>` in the version
53+
(`1.5.0-mcp.1--2.7.0`), the npm dist-tag `mcp` or `lms` (`npm i -g @liascript/devserver@mcp`). The tag is the
54+
version. Only the public `LiaScript/LiaScript-DevServer` publishes to npm.
55+
5156
Both the CLI version string (in `src/index.ts`'s `--version` output and `package.json`'s `version` field, formatted
5257
`<devserver-version>--<liascript-version>`) and the version banner rendered in `views/main.hbs` need to stay in sync
5358
when bumping versions.

0 commit comments

Comments
 (0)