feat(): Angular 18 support #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '18' | |
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 |