Skip to content

fix: avoid jsonc-parser runtime interop crash #7

fix: avoid jsonc-parser runtime interop crash

fix: avoid jsonc-parser runtime interop crash #7

Workflow file for this run

name: Publish npm
on:
push:
branches:
- main
permissions:
contents: write
concurrency:
group: publish-main
cancel-in-progress: false
jobs:
publish:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run typecheck
- run: npm run build
- run: npm run smoke
- name: Bump patch version
id: version
run: |
npm version patch --no-git-tag-version
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Commit release version
run: |
git add package.json package-lock.json
git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' commit -m "chore(release): v${{ steps.version.outputs.version }}"
git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' tag -a "v${{ steps.version.outputs.version }}" -m "v${{ steps.version.outputs.version }}"
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public
- name: Push release commit and tag
run: git push origin HEAD:main --follow-tags
- name: Create GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ steps.version.outputs.version }}" \
--title "v${{ steps.version.outputs.version }}" \
--generate-notes