Skip to content

v2.1.1

v2.1.1 #6

name: publish-npm-package
on:
release:
types: [ published ]
jobs:
github-packages:
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@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@cathayddt'
- run: npm ci
- run: npm run build:console
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm-registry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
scope: '@cathaybc'
- run: |
sed -i 's/"name": "@cathayddt\/bdk"/"name": "@cathaybc\/bdk"/' package.json
npm install
- run: npm run build:console
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}