Skip to content

ci: use buildspace typescript-service-release for telegram-ts#1

Closed
Yan Xue (yanxue06) wants to merge 1 commit into
mainfrom
chore/buildspace-release
Closed

ci: use buildspace typescript-service-release for telegram-ts#1
Yan Xue (yanxue06) wants to merge 1 commit into
mainfrom
chore/buildspace-release

Conversation

@yanxue06

@yanxue06 Yan Xue (yanxue06) commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Enrolls telegram-ts into buildspace releases by replacing the bespoke spec-driven release workflow with a call to the shared reusable workflow, matching how spectrum-ts and advanced-imessage-ts release.

jobs:
  release:
    uses: photon-hq/buildspace/.github/workflows/typescript-service-release.yaml@main
    with:
      service-name: telegram-ts
      working-directory: packages/telegram-ts
      build-command: "bun run build"
      use-oidc: true
      dry-run: false
    secrets: inherit

Behavior changes

  • Label-driven releases. Publishing now runs on a release-labeled PR merge to main (OpenAI-generated version + notes), with OIDC Trusted Publishing — same flow as the other TS packages.
  • Version contract. Versions are no longer mirrored from the Telegram Bot API version (10.0.0 ↔ Bot API 10.0); the workflow generates its own semver. scripts/compute-version.ts is now unused by the release path.
  • Trigger. No longer fires on specs/telegram-bot-api.openapi.json changes.

Follow-up

update-telegram-openapi.yaml opens spec-update PRs labeled telegram-spec-update. Under the new flow those won't publish unless they also carry the release label — worth a follow-up to relabel/add it if hands-off spec publishing should continue.

Requires

  • Org/repo secret OPENAI_API_KEY (inherited via secrets: inherit; spectrum-ts already relies on it).
  • npm Trusted Publisher registered for @photon-ai/telegram-ts (this repo + workflow).

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

Release Notes

This release contains no changes visible to end-users. Updates were made to internal development infrastructure and automation processes to improve deployment efficiency.

  • Chores
    • Infrastructure updates to internal release workflows.

Replace the bespoke spec-driven release workflow with a call to the shared
photon-hq/buildspace/.github/workflows/typescript-service-release.yaml@main
reusable workflow, matching how spectrum-ts and advanced-imessage-ts release.

Publishing now uses the standard label-driven flow (OpenAI-generated version +
notes, gated on a `release` PR label) with OIDC Trusted Publishing, instead of
mirroring the Telegram Bot API version via scripts/compute-version.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 8, 2026 05:22
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The release workflow is refactored to delegate npm publishing orchestration to a centralized reusable workflow. Inline job steps for checkout, build, test, versioning, and npm publish with provenance are removed; the workflow now invokes a shared release template, passing configuration inputs and inheriting secrets.

Changes

Release workflow centralization

Layer / File(s) Summary
Release job refactored to use centralized reusable workflow
.github/workflows/release.yaml
The monolithic release job is replaced with a call to photon-hq/buildspace/.github/workflows/typescript-service-release.yaml@main. Workflow permissions are narrowed to write-to-contents, read pull-requests, and id-token write. Inputs configure service name, working directory, build command, and release flags; the reusable workflow handles checkout, build, test, versioning, npm publish with provenance, and GitHub Release creation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops toward the central warren,
Where all the workflows gather 'round,
No more duplication in the garden—
One shared release, so clean and sound!
With secrets passed and inputs bound,
Our bundled magic knows the way.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adopting a reusable buildspace workflow for release management of the telegram-ts package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/buildspace-release

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the telegram-ts release automation from a bespoke, spec-driven workflow to the shared photon-hq/buildspace reusable workflow, aligning the repo’s release process with other TypeScript services.

Changes:

  • Replaced the in-repo release job steps with a call to photon-hq/buildspace/.github/workflows/typescript-service-release.yaml.
  • Simplified the trigger to run on pushes to main and updated workflow permissions for OIDC-based publishing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 3 to 6
on:
push:
branches: [main]
paths:
- "specs/telegram-bot-api.openapi.json"
workflow_dispatch:

Comment on lines 7 to 11
permissions:
contents: write # create git tag + GitHub Release
id-token: write # OIDC token exchange for npm Trusted Publishing

concurrency:
group: release
cancel-in-progress: false
contents: write
pull-requests: read
id-token: write

gh release create "$TAG" \
--title "$TAG" \
--notes "Telegram Bot API ${{ steps.version.outputs.telegram_version }} — published \`@photon-ai/telegram-ts@${{ steps.version.outputs.version }}\`."
uses: photon-hq/buildspace/.github/workflows/typescript-service-release.yaml@main
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.

3 participants