fix: add missing schema exports, bump versions, add schemas publish w… #5
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: Publish TypeScript SDK | |
| on: | |
| push: | |
| tags: | |
| - 'sdk-typescript-v*' | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm --filter @nimblebrain/mpak-sdk... build | |
| - run: pnpm --filter @nimblebrain/mpak-sdk lint | |
| - run: pnpm --filter @nimblebrain/mpak-sdk exec prettier --check "src/**/*.ts" "tests/**/*.ts" | |
| - run: pnpm --filter @nimblebrain/mpak-sdk typecheck | |
| - run: pnpm --filter @nimblebrain/mpak-sdk test | |
| publish: | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: pnpm install --frozen-lockfile | |
| - name: Verify tag matches package version | |
| run: | | |
| TAG_VERSION="${GITHUB_REF#refs/tags/sdk-typescript-v}" | |
| PKG_VERSION=$(node -e "console.log(require('./packages/sdk-typescript/package.json').version)") | |
| if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then | |
| echo "::error::Tag version ($TAG_VERSION) != package.json version ($PKG_VERSION)" | |
| exit 1 | |
| fi | |
| - name: Build | |
| run: pnpm --filter @nimblebrain/mpak-sdk... build | |
| - name: Publish to npm | |
| run: | | |
| # pnpm pack resolves workspace:* to real versions; npm publish keeps provenance | |
| pnpm pack | |
| npm publish nimblebrain-mpak-sdk-*.tgz --provenance --access public | |
| working-directory: packages/sdk-typescript |