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>
38 lines
889 B
YAML
38 lines
889 B
YAML
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 }}
|