Skip to content

v1.0.0

v1.0.0 #1

# Publishes the package to GitHub Packages when a GitHub Release is published.
# Requires: package name scoped as @OWNER/name (matches this repository owner).
# Consumers need .npmrc: @code-root:registry=https://npm.pkg.github.com
name: Publish to GitHub Packages
on:
release:
types: [published]
permissions:
contents: read
packages: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
registry-url: 'https://npm.pkg.github.com'
scope: '@code-root'
- name: Install dependencies
run: npm install
- name: Publish to GitHub Packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}