Skip to content

fix: update libs

fix: update libs #179

Workflow file for this run

name: Build & Publish
on:
push:
branches: [ prod, staging ]
env:
NODE_VERSION: 20.18.3
ENABLE_CACHE: yes
NPM_VERSION: 11.5.2
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: ${{ env.ENABLE_CACHE == 'yes' && 'npm' || '' }}
- run: npm i -g npm@${{ env.NPM_VERSION }}
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Typescript check
run: npm run ts:check
- name: Check eslint
run: npm run lint:check
- name: Test
run: npm run test -- --coverage
- uses: actions/upload-artifact@v4
with:
name: coverage-lcov
path: coverage
- name: Build
run: |
npm pkg delete scripts.prepare
npm run build
- name: Publish npm packages / create github release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
sonarcube:
runs-on: ubuntu-latest
needs: [release]
concurrency:
group: ${{ github.ref }}-sonarcube
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: coverage-lcov
path: coverage
- id: package-version
run: npx @lomray/microservices-cli package-version
- uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }}
with:
args: >
-Dsonar.projectVersion=${{ steps.package-version.outputs.version }}