feat: add optional header.level (1-4) for variable-sized headers (#41) #41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Please | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: googleapis/release-please-action@v5 | |
| id: release | |
| with: | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| # Publish is inlined here (not a separate workflow on release:created) | |
| # because GitHub does not trigger downstream workflows from events | |
| # authored by the default GITHUB_TOKEN — release-please-action's | |
| # GitHub release never fires release:created, so the previous | |
| # publish.yml never ran. | |
| # | |
| # `releases_created` (plural) is what the action sets in manifest | |
| # mode; the singular `release_created` only exists in non-manifest | |
| # mode and would silently skip every step here. | |
| - uses: actions/checkout@v6 | |
| if: ${{ steps.release.outputs.releases_created }} | |
| - uses: ./.github/actions/setup | |
| if: ${{ steps.release.outputs.releases_created }} | |
| - run: pnpm run lint | |
| if: ${{ steps.release.outputs.releases_created }} | |
| - run: pnpm run typecheck | |
| if: ${{ steps.release.outputs.releases_created }} | |
| - run: pnpm test | |
| if: ${{ steps.release.outputs.releases_created }} | |
| - run: pnpm run build:clean | |
| if: ${{ steps.release.outputs.releases_created }} | |
| # Trusted Publisher (OIDC) needs npm CLI >= 11.5.1; Node 22 ships | |
| # with npm 10.x. Run the modern CLI via `npx` from its separate | |
| # cache instead of `npm install -g npm@latest`, which races against | |
| # the running npm mid-install ("Cannot find module 'promise-retry'"). | |
| # npm 11+ also requires an explicit --tag for prereleases. | |
| - name: Publish to npm | |
| if: ${{ steps.release.outputs.releases_created }} | |
| run: | | |
| version=$(node -p "require('./package.json').version") | |
| if [[ "$version" == *-* ]]; then | |
| tag="${version#*-}" | |
| tag="${tag%%.*}" | |
| npx -y npm@latest publish --provenance --access public --tag "$tag" | |
| else | |
| npx -y npm@latest publish --provenance --access public | |
| fi |