Skip to content

Fix publishing setup and add auto-update workflow - #3

Merged
nastassiafulconis merged 1 commit into
mainfrom
publish-agentic-client
Nov 4, 2025
Merged

nastassiafulconis merged 1 commit into
mainfrom
publish-agentic-client

Conversation

@nastassiafulconis

Copy link
Copy Markdown
Collaborator

Summary

Fixes the changesets publishing workflow and adds automated OpenAPI schema updates with auto-publishing.

Changes

1. Fixed GitHub Actions Permissions

  • Updated release.yml to support PAT_TOKEN as fallback
  • Fixes: "GitHub Actions is not permitted to create or approve pull requests" error
  • Now works with either workflow permissions enabled OR a PAT token

2. Added Auto-Update Workflow

  • New .github/workflows/auto-update.yml
  • Runs daily at 2 AM UTC (cron scheduled)
  • Can also be triggered manually via Actions UI
  • Fully automated:
    1. Fetches latest OpenAPI schemas from docs.agentic.scope3.com
    2. Generates TypeScript types
    3. Checks if types changed
    4. If changed: commits → creates changeset → versions → builds → publishes to npm

3. Package Name

  • Keeping @scope3/agentic-client (not changing to @scope3data)
  • Publishing to npm.org with public access

Testing

✅ Type-check passed
✅ Build passed
✅ Tests passed (9/9)
✅ No TODOs or commented code
✅ Production-ready

Setup Required

To complete the setup, you need to do ONE of these:

Option A (Recommended): Enable Actions to create PRs

Option B: Create a Personal Access Token

  • Create PAT with repo and workflow scopes
  • Add it as PAT_TOKEN secret in repo settings

Also ensure:

  • ✅ NPM_TOKEN secret is set (for publishing to npm.org)
  • ✅ npm account has access to publish @scope3/agentic-client

How It Works

Manual Changes

  1. Developer creates changeset
  2. Merges to main
  3. Release workflow creates "Version Packages" PR
  4. Merge that PR → publishes to npm.org

Automated OpenAPI Updates

  1. Daily check at 2 AM UTC (or manual trigger)
  2. Fetches latest OpenAPI schemas
  3. If types changed → auto-commits, versions, and publishes
  4. No manual intervention needed

🤖 Generated with Claude Code

Changes:
- Fix GitHub Actions permissions for changesets to create PRs
- Add auto-update workflow for daily OpenAPI schema checks
- Keep package name as @scope3/agentic-client
- Publish to npm.org (public registry) with public access

The auto-update workflow:
- Runs daily at 2 AM UTC (can also be triggered manually)
- Fetches latest OpenAPI schemas
- Generates TypeScript types
- Auto-commits, versions, and publishes if types change

Fixes the "GitHub Actions is not permitted to create or approve pull requests" error by supporting PAT_TOKEN as fallback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nastassiafulconis
nastassiafulconis merged commit 627de29 into main Nov 4, 2025
6 checks passed
@nastassiafulconis
nastassiafulconis deleted the publish-agentic-client branch November 4, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant