Skip to content

Merge pull request #15 from oanhduong/claude/doctor-rules-docs #16

Merge pull request #15 from oanhduong/claude/doctor-rules-docs

Merge pull request #15 from oanhduong/claude/doctor-rules-docs #16

name: release-please
on:
push:
branches: [main]
workflow_dispatch:
inputs:
publish:
description: "Publish current package.json version to npm (bypasses release-please)"
type: boolean
default: false
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
if: github.event_name == 'push'
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Decide whether to publish
id: gate
run: |
if [[ "${{ steps.release.outputs.release_created }}" == "true" ]] || [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.publish }}" == "true" ]]; then
echo "publish=true" >> "$GITHUB_OUTPUT"
else
echo "publish=false" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@v4
if: steps.gate.outputs.publish == 'true'
- uses: actions/setup-node@v4
if: steps.gate.outputs.publish == 'true'
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: npm
- run: npm ci --no-audit --no-fund
if: steps.gate.outputs.publish == 'true'
- run: npm run lint
if: steps.gate.outputs.publish == 'true'
- run: npm run typecheck
if: steps.gate.outputs.publish == 'true'
- run: npm test
if: steps.gate.outputs.publish == 'true'
env:
CI: "true"
- run: npm run build
if: steps.gate.outputs.publish == 'true'
- run: npm publish --access public
if: steps.gate.outputs.publish == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}