Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/publish-js-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for changelog generation
- uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Install npm 11.6.2
run: npm install -g npm@11.6.2

- name: Determine version
id: set_version
Expand Down
6 changes: 3 additions & 3 deletions js/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ verify-ci: build docs test

publish-sdk-js:
./scripts/validate-release.sh
pnpm install
pnpm run build
pnpm publish --no-git-checks --provenance
npm install
npm run build
npm publish

# This is the only method I could find to install a package without explicitly
# adding a dependency or modifying lock files.
Expand Down
8 changes: 4 additions & 4 deletions js/scripts/publish-prerelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ echo ""

# Build the SDK
echo "Building SDK..."
pnpm install
pnpm run build
npm install
npm run build
echo "Build complete."
echo ""

Expand All @@ -87,13 +87,13 @@ echo ""
# In CI, just publish. Locally, ask for confirmation
if [ -n "${CI:-}" ] || [ -n "${GITHUB_ACTIONS:-}" ]; then
# Running in CI - publish without confirmation
pnpm publish --tag "$DIST_TAG" --no-git-checks --provenance
npm publish --tag "$DIST_TAG"
else
# Running locally - ask for confirmation
read -p "Ready to publish version $NEW_VERSION to npm with tag @$DIST_TAG? (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
pnpm publish --tag "$DIST_TAG" --no-git-checks
npm publish --tag "$DIST_TAG"
else
echo "Publish cancelled."
echo ""
Expand Down
Loading