Skip to content

chore(typescript-sdk): release v0.0.49 (#3615) #24

chore(typescript-sdk): release v0.0.49 (#3615)

chore(typescript-sdk): release v0.0.49 (#3615) #24

name: 'Publish TypeScript SDK'
on:
push:
branches:
- 'main'
paths:
- 'typescript-sdk/**'
tags:
- 'typescript-sdk-v*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
working-directory: './typescript-sdk'
env:
ACTIONS_RUNNER_DEBUG: true
NODE_OPTIONS: '--no-warnings'
jobs:
publish-sdk:
name: 'Publish to Registries'
runs-on: ['ubuntu-latest']
permissions:
contents: read
# The OIDC ID token is used for authentication with JSR.
id-token: write
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Setup bun'
uses: oven-sh/setup-bun@v2
with:
bun-version: 'latest'
registry-url: 'https://registry.npmjs.org'
- name: 'Install Dependencies'
run: bun install
- name: 'Prechecks'
run: |
bun run build
bun run typecheck
bun run check-package
- name: 'Publish to JSR'
run: bun scripts/publish.ts --period patch
- name: 'Publish to NPM'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm publish --access='public' --no-git-tags