Skip to content

Trial run for npm publish github action #7

Trial run for npm publish github action

Trial run for npm publish github action #7

name: Publish package to GitHub Packages and NPM
on:
push:
branches: master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry: "https://registry.npmjs.org/"
- run: npm ci
- run: npm run test:unit
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
# on:
# release:
# types: [published]
# jobs:
# build:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# steps:
# - uses: actions/checkout@v4
# # Setup .npmrc file to publish to GitHub Packages
# - uses: actions/setup-node@v4
# with:on:
# push:
# branches: main
# jobs:
# publish:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v3
# with:
# node-version: "20"
# - run: npm ci
# - run: npm test
# - uses: JS-DevTools/npm-publish@v3
# with:
# token: ${{ secrets.NPM_TOKEN }}
# node-version: "20.x"
# registry-url: "https://npm.pkg.github.com"
# # Defaults to the user or organization that owns the workflow file
# scope: "@octocat"
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}