feat: added possibility to pass not ony functions and classes #19
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: NPM Package | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
registry-url: 'https://registry.npmjs.org' | |
- name: install dependencies | |
run: npm ci | |
- name: check format | |
run: npm run format:check | |
- name: test | |
run: npm run test | |
- name: build | |
run: npm run build | |
- name: set version | |
if: github.event_name == 'release' | |
run: npm --no-git-tag-version version ${GITHUB_REF#refs/*/} | |
- name: publish package | |
if: github.event_name == 'release' | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_AUTH_TOKEN }} | |
with: | |
args: > | |
-Dsonar.organization=mrcwbr | |
-Dsonar.projectKey=ioc-service-container | |
-Dsonar.sources=src/ | |
-Dsonar.tests=tests/ | |
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info |