Skip to content

fix(deps): update dependency lint-staged to v15.2.7 (#415) #352

fix(deps): update dependency lint-staged to v15.2.7 (#415)

fix(deps): update dependency lint-staged to v15.2.7 (#415) #352

Workflow file for this run

name: CI/CD
on:
workflow_dispatch: {}
push:
branches:
- main
- '[0-9]+.x'
paths:
- src/**
- package-lock.json
- template.yaml
- .github/workflows/node-ci.yml
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
jobs:
build:
name: Build & Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Lint the code
run: npm run lint:json
- name: Run unit tests
run: npm run test:cov
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-central-1
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/ServerlessAppManagementAccess
role-duration-seconds: 1800
- name: Validate template
run: sam validate
- name: Create new release
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
@semantic-release/exec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Retrieve package version
id: package-version
run: echo "version=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
- name: Rewrite ESLint report for SonarCloud
run: sed -i "s+${GITHUB_WORKSPACE}+/github/workspace+g" eslint-report.json
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v2.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectVersion=${{ steps.package-version.outputs.version }}