docs/Add API docs generator and update scripts (#220) #12
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 SDKs | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'sdks/**' | ||
| # Prevent concurrent releases | ||
| concurrency: | ||
| group: release | ||
| cancel-in-progress: false | ||
| jobs: | ||
| typescript-integration: | ||
| uses: ./.github/workflows/typescript-integration.yml | ||
| secrets: inherit | ||
| typescript-unit: | ||
|
Check failure on line 20 in .github/workflows/ts-sdk-publish.yml
|
||
| uses: ./.github/workflows/typescript-unit.yml | ||
| secrets: inherit | ||
| publish-sdks: | ||
| name: Publish SDKs | ||
| runs-on: ubuntu-latest | ||
| needs: [typescript-integration, typescript-unit] | ||
| # Only run if there are changes in changeset files or package files | ||
| if: contains(github.event.head_commit.message, 'changeset') | ||
| defaults: | ||
| run: | ||
| working-directory: sdks | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # Fetch full history for changeset | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 'lts/*' | ||
| registry-url: 'https://registry.npmjs.org' | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10.12.3 | ||
| run_install: false | ||
| - name: Get pnpm store directory | ||
| shell: bash | ||
| run: | | ||
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
| - name: Setup pnpm cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.STORE_PATH }} | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-store- | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Build TypeScript SDK | ||
| run: pnpm --filter "@kora/sdk" build | ||
| - name: Create release PR or publish packages | ||
| id: changesets | ||
| uses: changesets/action@v1 | ||
| with: | ||
| version: pnpm changeset:version | ||
| publish: pnpm changeset:publish | ||
| commit: 'chore: release ts sdk packages' | ||
| title: 'chore: release ts sdk packages' | ||
| createGithubReleases: false | ||
| env: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Publish release summary | ||
| if: steps.changesets.outputs.published == 'true' | ||
| run: | | ||
| echo "🎉 Successfully published packages:" | ||
| echo "${{ steps.changesets.outputs.publishedPackages }}" | jq -r '.[] | " - \(.name)@\(.version)"' | ||