Skip to content

Merge pull request #7 from nestm-dev/agent/harness-orchestration #6

Merge pull request #7 from nestm-dev/agent/harness-orchestration

Merge pull request #7 from nestm-dev/agent/harness-orchestration #6

Workflow file for this run

name: Release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
id-token: write
concurrency: release-${{ github.ref }}
jobs:
release:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 0 }
- uses: pnpm/action-setup@v4
# Do not set registry-url: npm Trusted Publishing uses OIDC.
- uses: actions/setup-node@v5
with: { node-version: 24, cache: pnpm }
- name: Assert pnpm supports native OIDC publishing
run: |
node -e '
const [major, minor] = require("child_process")
.execSync("pnpm --version").toString().trim().split(".").map(Number);
if (major < 11 || (major === 11 && minor < 11)) {
throw new Error("pnpm >= 11.11 required for OIDC trusted publishing");
}
'
- run: pnpm install --frozen-lockfile
- run: pnpm run verify
- run: node scripts/check-package.mjs
- run: pnpm exec attw --pack . --profile esm-only
- name: Create release PR or publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
version: pnpm changeset version
title: "chore: release @nestm/ai-sdk"
commit: "chore: release @nestm/ai-sdk"
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Reconcile git tag with npm
if: always()
run: |
VERSION=$(node -p "require('./package.json').version")
if [ "$VERSION" = "0.1.0-alpha.0" ]; then
echo "Skipping the intentionally untagged bootstrap release."
exit 0
fi
TAG="@nestm/ai-sdk@$VERSION"
if npm view "@nestm/ai-sdk@$VERSION" version > /dev/null 2>&1; then
git tag "$TAG" 2> /dev/null && git push origin "$TAG" || true
fi