release: bump SDK version to 0.2.0 #6
Workflow file for this run
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| # Publishing uses npm OIDC "trusted publishing": GitHub Actions mints a short-lived | |
| # identity token that npm verifies against a trusted publisher you configure once — | |
| # no automation token, no NODE_AUTH_TOKEN, nothing that expires. It also attaches a | |
| # signed provenance attestation to the package automatically. | |
| # | |
| # One-time setup: on npmjs.com → the @busbar/busbar-admin package → Settings → | |
| # "Trusted Publisher" → GitHub Actions (owner: GetBusbar, repo: busbar-js, | |
| # workflow: release.yml). | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # required for OIDC trusted publishing + provenance | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Use an npm that supports OIDC trusted publishing | |
| run: npm install -g npm@latest | |
| - name: Install deps (pinned) | |
| run: npm ci | |
| - name: Regenerate client from openapi.json | |
| run: npm run generate | |
| - name: Fail if the committed client is stale | |
| run: git diff --exit-code -- src | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Publish to npm (OIDC trusted publishing — no token) | |
| run: npm publish --access public |