Repository navigation
fix(runner): normalize iterm terminal targets #254
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 to npm | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'packages/sdk/**' | |
| - 'packages/cli/**' | |
| - 'packages/browser-runner/**' | |
| - '.github/workflows/publish-npm.yml' | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| - run: pnpm install --frozen-lockfile | |
| - name: Build SDK | |
| run: pnpm --filter @proagentstore/sdk build | |
| - name: Check published SDK version | |
| id: sdk-version | |
| run: | | |
| version="$(node -p "require('./packages/sdk/package.json').version")" | |
| existing="$(npm view "@proagentstore/sdk@$version" version 2>/dev/null || true)" | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| echo "existing=$existing" >> "$GITHUB_OUTPUT" | |
| if [ "$existing" = "$version" ]; then | |
| echo "SDK version $version is already published; skipping npm publish." | |
| fi | |
| - name: Publish SDK | |
| if: steps.sdk-version.outputs.existing != steps.sdk-version.outputs.version | |
| run: cd packages/sdk && npm publish --access public | |
| - name: Build CLI | |
| run: pnpm --filter @proagentstore/cli build | |
| - name: Check published CLI version | |
| id: cli-version | |
| run: | | |
| version="$(node -p "require('./packages/cli/package.json').version")" | |
| existing="$(npm view "@proagentstore/cli@$version" version 2>/dev/null || true)" | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| echo "existing=$existing" >> "$GITHUB_OUTPUT" | |
| if [ "$existing" = "$version" ]; then | |
| echo "CLI version $version is already published; skipping npm publish." | |
| fi | |
| - name: Publish CLI | |
| if: steps.cli-version.outputs.existing != steps.cli-version.outputs.version | |
| run: cd packages/cli && npm publish --access public |