Skip to content

chore: Fix sonarqube action #75

chore: Fix sonarqube action

chore: Fix sonarqube action #75

Workflow file for this run

name: release
# Run the workflow when a Pull Request is opened or when changes are pushed to master
on:
pull_request:
push:
branches: [main]
#paths:
# - "common/**"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Run the steps below with the following versions of Node.js
node-version: [18.x]
steps:
# Fetch the latest commit
- name: Checkout
uses: actions/checkout@v4
# Setup Node.js using the appropriate version
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# Install package dependencies
- name: Install
run: yarn install --frozen-lockfile
# Build
- name: Build
run: yarn workspace common build
# Run tests
- name: Test
working-directory: common
run: yarn workspace common test
release:
# Only release on push to master
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn workspace common build
- name: Release
run: yarn exec multi-semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REGISTRY_USER: ${{ github. actor }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}