Node.js CI #859
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
# https://docs.github.com/en/actions/guides/building-and-testing-nodejs | |
name: Node.js CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: "00 03 * * *" | |
- cron: "00 11 * * *" | |
jobs: | |
release-script: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Each version of Node.js specified in the node-version array creates a job that runs the same steps. | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "11" | |
distribution: "adopt" | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Print versions | |
run: | | |
git --version | |
node --version && npm --version | |
mvn -v | |
- name: Update NPM | |
run: | | |
npm --version | |
npm install -g npm@^10.2.5 | |
npm --version | |
- name: Set git user information | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "workflowsTester" | |
- name: Run release script | |
# 2.2.2 ==> does not exist on pnc-api-types-ts, but does on the pnc repo | |
run: ./release.sh 2.2.2 | |
shell: bash | |
check-package-lock: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Each version of Node.js specified in the node-version array creates a job that runs the same steps. | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: node --version && npm --version | |
- run: npm install -g npm@^10.2.5 | |
- run: npm --version | |
- run: npm install | |
- name: Fail if npm install changed package-lock.json | |
run: git diff --exit-code package-lock.json |