Skip to content

build(deps): bump zod from 4.4.3 to 4.5.4 in /typescript #821

build(deps): bump zod from 4.4.3 to 4.5.4 in /typescript

build(deps): bump zod from 4.4.3 to 4.5.4 in /typescript #821

Workflow file for this run

name: Continuous Releases
on:
pull_request:
types:
- labeled
permissions:
contents: read
pull-requests: write
jobs:
detect-changes:
if: ${{ github.event.label.name == 'preview' }}
runs-on: ubuntu-latest
outputs:
typescript: ${{ steps.changes.outputs.typescript }}
mcp: ${{ steps.changes.outputs.mcp }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Detect file changes
id: changes
run: |
git fetch origin "${{ github.base_ref }}"
if git diff --name-only "origin/${{ github.base_ref }}"...HEAD | grep -q "^typescript/"; then
echo "typescript=true" >> "$GITHUB_OUTPUT"
else
echo "typescript=false" >> "$GITHUB_OUTPUT"
fi
if git diff --name-only "origin/${{ github.base_ref }}"...HEAD | grep -q "^mcp/"; then
echo "mcp=true" >> "$GITHUB_OUTPUT"
else
echo "mcp=false" >> "$GITHUB_OUTPUT"
fi
publish-typescript:
needs: detect-changes
if: needs.detect-changes.outputs.typescript == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ./typescript/package.json
cache: npm
cache-dependency-path: ./typescript/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: ./typescript
- name: Build package
run: npm run build
working-directory: ./typescript
- name: Publish preview package
run: npx pkg-pr-new publish './typescript' --json output.json --comment=off
- name: Post or update comment
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
console.log(output);
const packages = output.packages
.map((p) => `- ${p.name}: ${p.url}`)
.join('\n');
const sha = context.payload.pull_request.head.sha
const commitUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${sha}`;
const body = `## 🚀 TypeScript SDK Preview Published
### Published Packages:
${packages}
[View Commit](${commitUrl})`;
const botCommentIdentifier = '## 🚀 TypeScript SDK Preview Published';
async function findBotComment(issueNumber) {
if (!issueNumber) return null;
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
});
return comments.data.find((comment) =>
comment.body.includes(botCommentIdentifier)
);
}
async function createOrUpdateComment(issueNumber) {
if (!issueNumber) {
console.log('No issue number provided. Cannot post or update comment.');
return;
}
const existingComment = await findBotComment(issueNumber);
if (existingComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: body,
});
} else {
await github.rest.issues.createComment({
issue_number: issueNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body: body,
});
}
}
if (context.issue.number) {
await createOrUpdateComment(context.issue.number);
}
publish-mcp:
needs: detect-changes
if: needs.detect-changes.outputs.mcp == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ./mcp/package.json
cache: npm
cache-dependency-path: ./mcp/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: ./mcp
- name: Build package
run: npm run build
working-directory: ./mcp
- name: Publish preview package
run: npx pkg-pr-new publish './mcp' --json output.json --comment=off
- name: Post or update comment
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
console.log(output);
const packages = output.packages
.map((p) => `- ${p.name}: ${p.url}`)
.join('\n');
const sha = context.payload.pull_request.head.sha
const commitUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${sha}`;
const body = `## 🚀 MCP Preview Published
### Published Packages:
${packages}
[View Commit](${commitUrl})`;
const botCommentIdentifier = '## 🚀 MCP Preview Published';
async function findBotComment(issueNumber) {
if (!issueNumber) return null;
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
});
return comments.data.find((comment) =>
comment.body.includes(botCommentIdentifier)
);
}
async function createOrUpdateComment(issueNumber) {
if (!issueNumber) {
console.log('No issue number provided. Cannot post or update comment.');
return;
}
const existingComment = await findBotComment(issueNumber);
if (existingComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: body,
});
} else {
await github.rest.issues.createComment({
issue_number: issueNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body: body,
});
}
}
if (context.issue.number) {
await createOrUpdateComment(context.issue.number);
}
cleanup:
needs: [detect-changes, publish-typescript, publish-mcp]
if: always() && github.event.label.name == 'preview'
runs-on: ubuntu-latest
steps:
- name: Delete label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
gh pr edit "$PR_NUMBER" --remove-label "preview"