Skip to content

docs/Add API docs generator and update scripts (#220) #12

docs/Add API docs generator and update scripts (#220)

docs/Add API docs generator and update scripts (#220) #12

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

View workflow run for this annotation

GitHub Actions / Publish SDKs

Invalid workflow file

The workflow is not valid. .github/workflows/ts-sdk-publish.yml (Line: 20, Col: 3): Error calling workflow 'solana-foundation/kora/.github/workflows/typescript-unit.yml@ece4b9b655a471e4309a914540e66bf04c4b4779'. The nested job 'typescript-unit' is requesting 'pull-requests: write', but is only allowed 'pull-requests: none'.
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)"'