chore(deps): bump github/codeql-action from 2 to 3 #75
Workflow file for this run
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: ci-cd | |
on: | |
push: | |
branches: | |
- '**/*' | |
pull_request: | |
release: | |
types: [released] | |
jobs: | |
unit: | |
name: Unit | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node: [14, 16, 18, 19, 20] | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install NPM credentials | |
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
- name: Get yarn cache | |
id: yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore yarn cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install NPM Packages | |
run: yarn install --frozen-lockfile | |
- name: Test | |
run: yarn test | |
- name: Upload test coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-coverage | |
path: var/coverage/test/ | |
publish: | |
name: Publish | |
runs-on: ubuntu-20.04 | |
needs: unit | |
if: github.event_name == 'release' | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install NPM credentials | |
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
- name: Get yarn cache | |
id: yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore yarn cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install NPM Packages | |
run: yarn install --frozen-lockfile | |
- name: Publish | |
run: npm publish |