Skip to content

Commit 31dce76

Browse files
Publish nightly CLI to npm
- Add a nightly publish job to the release workflow - Document trusted publishing for the nightly workflow - Co-authored-by: codex <[email protected]>
1 parent 97efd80 commit 31dce76

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

‎.github/workflows/nightly-release.yml‎

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ concurrency:
1111

1212
permissions:
1313
contents: write
14+
id-token: write
1415

1516
jobs:
1617
preflight:
@@ -214,9 +215,43 @@ jobs:
214215
path: release-publish/*
215216
if-no-files-found: error
216217

218+
publish_cli:
219+
name: Publish CLI to npm (nightly)
220+
needs: [preflight, build]
221+
runs-on: ubuntu-24.04
222+
timeout-minutes: 10
223+
steps:
224+
- name: Checkout
225+
uses: actions/checkout@v6
226+
with:
227+
ref: ${{ needs.preflight.outputs.ref }}
228+
229+
- name: Setup Bun
230+
uses: oven-sh/setup-bun@v2
231+
with:
232+
bun-version-file: package.json
233+
234+
- name: Setup Node
235+
uses: actions/setup-node@v6
236+
with:
237+
node-version-file: package.json
238+
registry-url: https://registry.npmjs.org
239+
240+
- name: Install dependencies
241+
run: bun install --frozen-lockfile
242+
243+
- name: Align package versions to nightly version
244+
run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
245+
246+
- name: Build CLI package
247+
run: bun run build --filter=@t3tools/web --filter=t3
248+
249+
- name: Publish CLI package to npm nightly tag
250+
run: node apps/server/scripts/cli.ts publish --tag nightly --app-version "${{ needs.preflight.outputs.version }}" --verbose
251+
217252
release:
218253
name: Publish GitHub Release
219-
needs: [preflight, build]
254+
needs: [preflight, build, publish_cli]
220255
runs-on: ubuntu-24.04
221256
timeout-minutes: 10
222257
steps:

‎docs/release.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This document covers how to run desktop releases from one tag, first without sig
3131
- `make_latest` is always `false`
3232
- Uses the current `apps/desktop/package.json` semver core (`X.Y.Z`) as the nightly base, then appends a nightly prerelease suffix.
3333
- Publishes Electron auto-update metadata to the dedicated `nightly` updater channel, so desktop users can opt into that track independently from stable.
34-
- Does not publish the CLI package to npm.
34+
- Publishes the CLI package (`apps/server`, npm package `t3`) to the `nightly` npm dist-tag using the same nightly version.
3535
- Does not commit version bumps back to `main`.
3636

3737
## Desktop auto-update notes
@@ -69,6 +69,7 @@ Checklist:
6969
- Repository: this repo
7070
- Workflow file: `.github/workflows/release.yml`
7171
- Environment (if used): match your npm trusted publishing config
72+
- Add a second trusted publisher entry for `.github/workflows/nightly-release.yml` if nightly CLI publishes should also use OIDC.
7273
3. Ensure npm account and org policies allow trusted publishing for the package.
7374
4. Create release tag `vX.Y.Z` and push; workflow will:
7475
- set `apps/server/package.json` version to `X.Y.Z`

0 commit comments

Comments
 (0)