8000 Automate npm publish and GitHub release on tag push by dominion525 · Pull Request #10 · dominion525/familiar · GitHub
[go: up one dir, main page]

Skip to content

Automate npm publish and GitHub release on tag push - #10

Merged
dominion525 merged 2 commits into
mainfrom
chore/release-workflow
Jun 22, 2026
Merged

dominion525 merged 2 commits into
mainfrom
chore/release-workflow

Conversation

@dominion525
@dominion525 dominion525 commented Jun 22, 2026 •
Copy link
Copy Markdown
Owner

Summary

Add .github/workflows/release.yml so that pushing a v* tag triggers npm publish (with --provenance via OIDC trusted publishing) followed by a GitHub Release with auto-generated notes.

Permissions: contents: write (release create) + id-token: write (OIDC token mint). All other defaults left at the most restrictive setting.

Notes on choices

  • runs-on: ubuntu-latest: all mcp/ tests mock node:child_process / applescript, so macOS is not required at the publish stage. Existing ci.yml jobs that touch actual AppleScript stay on macos-latest.
  • setup-node node-version: '24' provides npm 11.5.1+, the minimum required for trusted publishing.
  • registry-url intentionally omitted: setup-node would otherwise write a dummy NODE_AUTH_TOKEN template into .npmrc that silently bypasses the OIDC exchange (documented gotcha on docs.npmjs.com).
  • cache intentionally omitted: release builds skip dependency cache to reduce cache-poisoning supply-chain risk.
  • actions/checkout is pinned to v7.0.0 (Node 24) and actions/setup-node to v6.4.0. The same actions/checkout SHA bump is applied to the existing ci.yml in this PR to drop the Node 20 deprecation warning.
  • Tag name passed via env: TAG: ${{ github.ref_name }} instead of inline ${{ }} in run: to keep workflow-injection guidance explicit.

The @dominion525/familiar-mcp npm package already has GitHub Actions registered as a Trusted Publisher for this workflow.

dominion525 and others added 2 commits June 22, 2026 23:13
- Trigger: v* tag push → install → build → npm publish --provenance (OIDC trusted publishing) → gh release create --generate-notes
- permissions: contents: write (release create) + id-token: write (OIDC token mint)
- runs-on: ubuntu-latest because all mcp tests mock node:child_process / applescript so macOS is not required at the publish stage
- setup-node node-version: 24 to get npm 11.5.1+, which is the minimum for trusted publishing
- registry-url intentionally omitted: setup-node would write a dummy NODE_AUTH_TOKEN template into .npmrc that silently bypasses the OIDC exchange
- cache intentionally omitted on release builds to reduce cache-poisoning supply-chain risk
- actions/checkout and actions/setup-node SHA-pinned to match the existing ci.yml style
- tag name passed via env (TAG) instead of inline ${{ }} expansion in run: to keep workflow-injection guidance explicit

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- actions/checkout v4.3.1 ran on Node 20, which GitHub Actions deprecated 2025-09-19 and now force-runs on Node 24 with a per-job warning
- Bump SHA pin to v7.0.0 across both .github/workflows/release.yml (1 occurrence) and .github/workflows/ci.yml (3 occurrences)
- actions/setup-node already pinned to v6.4.0 (Node 24 native), no change needed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dominion525
dominion525 merged commit 6956999 into main Jun 22, 2026
3 checks passed
@dominion525
dominion525 deleted the chore/release-workflow branch June 22, 2026 14:32
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

0