Skip to content

Upgrade node

Upgrade node #35

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@v3
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
# Step 3: Install pnpm
- name: Install pnpm
run: |
npm install -g pnpm
# Step 4: Install dependencies with pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Step 5: Build the library with pnpm
- name: Build ng-mdx
run: pnpm 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
# Step 7: Run semantic-release to publish to npm
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: pnpx semantic-release