chore: rename npm package from @bootnodedev/cbn to @bootnodedev/canto… #15
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
| # Publishes @bootnodedev/canton-barebones to npm via Changesets. | |
| # | |
| # Flow: every push to main runs this. The changesets action either | |
| # (a) opens/updates a "Version Packages" PR when unreleased changesets exist, or | |
| # (b) publishes to npm when that PR was merged (i.e. package.json version bumped). | |
| # Nothing is published on a normal merge — only when the Version Packages PR lands. | |
| name: Release | |
| on: | |
| push: | |
| branches: [main] | |
| # Avoid two release runs racing on the same ref (e.g. rapid merges). | |
| concurrency: release-${{ github.ref }} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # create tags / GitHub releases and push the Version Packages PR | |
| pull-requests: write # open and update the Version Packages PR | |
| id-token: write # npm trusted publishing (OIDC) and provenance | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # changesets needs full history to compute versions | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| # Publishing uses npm trusted publishing (OIDC) — the trusted publisher is | |
| # configured on npmjs.com for this repo/workflow, so no NPM_TOKEN is needed | |
| # and provenance is attached automatically. It requires npm >= 11.5.1, | |
| # while node 22 ships npm 10. | |
| - run: npm install -g npm@latest | |
| - run: npm ci | |
| # Gate: unit tests must pass before anything is published. | |
| - run: npm test | |
| - name: Create Version PR or publish | |
| uses: changesets/action@v1 | |
| with: | |
| publish: npm run release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |