build: test #18
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: Publish my node package | |
on: | |
push: | |
branches: [cur-publish, cur-publish-dev] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x, 18.x, 20.x] | |
mongodb-version: ['6.0'] | |
steps: | |
# Checkout action repository | |
- name: Checkout action repository | |
uses: actions/checkout@v4 | |
with: | |
repository: node-modules/github-actions | |
path: action_repo | |
# Checkout project repository | |
- name: Checkout project repository | |
uses: actions/checkout@v4 | |
with: | |
path: main_repo | |
token: ${{ secrets.GIT_TOKEN }} | |
# Setup Node.js environment | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
# Install action dependencies | |
- name: Install action dependencies | |
run: npm i --no-package-lock --no-fund --omit=dev | |
working-directory: action_repo/scripts/release | |
# Install dependencies | |
- name: Install dependencies | |
run: npm i --no-package-lock --no-fund | |
- name: Publish to npm | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: Publish to github package registry | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.GIT_TOKEN }} | |
registry: "https://npm.pkg.github.com" |