Skip to content

Publish GitHub Package #3

Publish GitHub Package

Publish GitHub Package #3

Workflow file for this run

name: Publish GitHub Package
on:
workflow_dispatch:
release:
types: [published]
jobs:
ghpkg:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: checkout
uses: actions/checkout@v4
- name: Update package.json
run: |
rm package.json
mv package.github.json package.json
# Setup .npmrc file to publish to npm
- name: setup-node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@noclocks'
# - name: ci
# run: npm ci
- name: publish-gh
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}