Configure GitHub Packages publishing
Some checks failed
Publish package to GitHub Packages / publish (push) Has been cancelled

Scope the package as @richiesnitch/ads3-design-system, add repository +
publishConfig (GitHub Packages registry), and a publish-on-tag GitHub Actions
workflow. Add react/react-dom as devDependencies so the library build runs in
CI (they remain peerDependencies for consumers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 12:59:34 +10:00
parent 69751eb6f2
commit 6d3331f802
3 changed files with 58 additions and 12 deletions

37
.github/workflows/publish-package.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Publish package to GitHub Packages
# Publishes @richiesnitch/ads3-design-system to GitHub Packages when a version
# tag (v*) is pushed, or on manual dispatch. Uses the workflow's built-in
# GITHUB_TOKEN (no PAT needed) — packages:write permission is granted below.
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com
- name: Install dependencies
run: npm ci
- name: Build library
run: npm run build:lib
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}