Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 }} |