Skip to content

chore(): npm-publish #48

chore(): npm-publish

chore(): npm-publish #48

Workflow file for this run

name: npm-publish
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org/"
token: ${{ secrets.NPM_TOKEN }} # Auth for npm
# Step 3: Install pnpm
- name: Install npm
run: npm ci
# Step 5: Build the library with pnpm
- name: Build ng-mdx
run: npm run lib.build
# Step 6: Copy the root README.md to the library folder
- name: Copy README.md to library folder
run: cp README.md dist/ngx-md/README.md
- name: Publish to npm
run: cd dist/npx-md && npm publish