Skip to content

Set up GitHub Packages auto publish#41

Open
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-22-run-26211198958
Open

Set up GitHub Packages auto publish#41
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-22-run-26211198958

Conversation

@claude

@claude claude Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Closes #22

What's in this PR

package.json — adds publishConfig pointing at the GitHub Packages npm registry. This is the only change I can push (the GitHub App token lacks workflows permission for workflow files).

One manual step needed

After merging, add this file to your local clone and push to main:

.github/workflows/publish-to-github-packages.yaml

name: Publish to GitHub Packages

on:
  push:
    tags:
      - "v*"

jobs:
  publish-to-github-packages:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "20"
          registry-url: "https://npm.pkg.github.com"
          scope: "@chriscalo"

      - name: Install dependencies
        run: npm ci

      - name: Publish
        run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

To release after setup

npm version patch   # or minor / major
git push --follow-tags

The workflow fires on any v* tag and publishes to GitHub Packages automatically. No build step — @chriscalo/file is plain JS.

Points npm publish at npm.pkg.github.com as required for
GitHub Packages publishing.

Closes #22

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Set up GitHub packages auto publish

0 participants