Some checks failed
Publish codemirror-helix / publish (push) Failing after 2m16s
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Publish codemirror-helix
|
|
|
|
# Releases the packages/codemirror-helix workspace package to npm.
|
|
# Trigger by pushing a tag like `codemirror-helix-v0.1.0` whose version
|
|
# matches packages/codemirror-helix/package.json.
|
|
on:
|
|
push:
|
|
tags:
|
|
- "codemirror-helix-v*"
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: x86
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: packages/codemirror-helix
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
# Workspace install must happen at the monorepo root.
|
|
- name: Install dependencies
|
|
working-directory: .
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Check tag matches package version
|
|
run: |
|
|
PACKAGE_VERSION="$(node -p "require('./package.json').version")"
|
|
TAG_NAME="${GITHUB_REF_NAME:-${GITHUB_REF#refs/tags/}}"
|
|
test "codemirror-helix-v${PACKAGE_VERSION}" = "${TAG_NAME}"
|
|
|
|
- name: Build
|
|
run: bun run build
|
|
|
|
- name: Publish
|
|
run: npm publish --access public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|