From ec878a17e3fba0ae4311232847096265d4c9b665 Mon Sep 17 00:00:00 2001 From: Marco Weber Date: Tue, 8 Aug 2023 15:55:44 +0200 Subject: [PATCH] - updated ci.yml --- .github/workflows/{publish.yml => ci.yml} | 27 ++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) rename .github/workflows/{publish.yml => ci.yml} (69%) diff --git a/.github/workflows/publish.yml b/.github/workflows/ci.yml similarity index 69% rename from .github/workflows/publish.yml rename to .github/workflows/ci.yml index be883c9..a0847c4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/ci.yml @@ -1,35 +1,42 @@ name: NPM Package on: + push: + branches: [ master ] + pull_request: + branches: [ master ] release: types: [created] - + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '18' + cache: 'npm' registry-url: 'https://registry.npmjs.org' - + - name: install dependencies run: npm ci - + - 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 to npmjs.com + if: github.event_name == 'release' run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - + - name: sonar scanner run: npm run sonar -- -Dsonar.login=${{ secrets.SONAR_AUTH_TOKEN }}