Skip to content

Commit 70e9dfc

Browse files
jrusso1020claude
andcommitted
fix(ci): rename CLI package to match npm and make publish idempotent
The CLI is published to npm as unscoped `hyperframes` but the package.json had `@hyperframes/cli`, causing ENEEDAUTH on publish (wrong scope for the npm token). Also replace per-step continue-on-error with a single publish script that skips already-published versions and fails on real errors, making re-runs safe. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 30f9ec4 commit 70e9dfc

2 files changed

Lines changed: 40 additions & 29 deletions

File tree

.github/workflows/publish.yml

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,54 @@ jobs:
2727
- run: bun run build
2828
- run: bun run verify:packed-manifests
2929

30-
- name: Publish @hyperframes/core
31-
continue-on-error: true
32-
run: pnpm --filter @hyperframes/core publish --access public --no-git-checks
30+
- name: Publish packages
3331
env:
3432
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
run: |
34+
VERSION="${GITHUB_REF_NAME#v}"
35+
FAILED=0
3536
36-
- name: Publish @hyperframes/engine
37-
continue-on-error: true
38-
run: pnpm --filter @hyperframes/engine publish --access public --no-git-checks
39-
env:
40-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
publish_pkg() {
38+
local filter="$1"
39+
local name="$2"
4140
42-
- name: Publish @hyperframes/producer
43-
continue-on-error: true
44-
run: pnpm --filter @hyperframes/producer publish --access public --no-git-checks
45-
env:
46-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
# Check if this version is already published
42+
if npm view "${name}@${VERSION}" version >/dev/null 2>&1; then
43+
echo "⏭️ ${name}@${VERSION} already published — skipping"
44+
return 0
45+
fi
4746
48-
- name: Publish @hyperframes/studio
49-
continue-on-error: true
50-
run: pnpm --filter @hyperframes/studio publish --access public --no-git-checks
51-
env:
52-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
echo "📦 Publishing ${name}@${VERSION}..."
48+
if pnpm --filter "$filter" publish --access public --no-git-checks; then
49+
echo "✅ ${name}@${VERSION} published"
50+
else
51+
echo "❌ ${name}@${VERSION} failed to publish"
52+
FAILED=1
53+
fi
54+
}
5355
54-
- name: Publish hyperframes (CLI)
55-
continue-on-error: true
56-
run: pnpm --filter @hyperframes/cli publish --access public --no-git-checks
57-
env:
58-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
56+
publish_pkg "@hyperframes/core" "@hyperframes/core"
57+
publish_pkg "@hyperframes/engine" "@hyperframes/engine"
58+
publish_pkg "@hyperframes/producer" "@hyperframes/producer"
59+
publish_pkg "@hyperframes/studio" "@hyperframes/studio"
60+
publish_pkg "hyperframes" "hyperframes"
61+
62+
if [ "$FAILED" -ne 0 ]; then
63+
echo "::error::One or more packages failed to publish"
64+
exit 1
65+
fi
5966
6067
- name: Create GitHub Release
61-
continue-on-error: true
6268
env:
6369
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6470
run: |
6571
VERSION="${GITHUB_REF_NAME#v}"
66-
gh release create "v${VERSION}" \
67-
--repo "${{ github.repository }}" \
68-
--title "v${VERSION}" \
69-
--generate-notes
72+
# Skip if release already exists (idempotent re-runs)
73+
if gh release view "v${VERSION}" --repo "${{ github.repository }}" >/dev/null 2>&1; then
74+
echo "Release v${VERSION} already exists — skipping"
75+
else
76+
gh release create "v${VERSION}" \
77+
--repo "${{ github.repository }}" \
78+
--title "v${VERSION}" \
79+
--generate-notes
80+
fi

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@hyperframes/cli",
2+
"name": "hyperframes",
33
"version": "0.1.4",
44
"description": "HyperFrames CLI — create, preview, and render HTML video compositions",
55
"bin": {

0 commit comments

Comments
 (0)