Configure GitHub Packages publishing
Some checks failed
Publish package to GitHub Packages / publish (push) Has been cancelled
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:
37
.github/workflows/publish-package.yml
vendored
Normal file
37
.github/workflows/publish-package.yml
vendored
Normal 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 }}
|
||||
Reference in New Issue
Block a user