Skip to content

build: release v4.0.3 #288

build: release v4.0.3

build: release v4.0.3 #288

Workflow file for this run

name: Build
on:
push:
branches:
- '*'
- '!main'
pull_request:
branches:
- '*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
status:
name: Success build
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [ build ]
steps:
- id: status
name: Load failure jobs count
env:
URL: https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs
USER: admin:${{ secrets.GITHUB_TOKEN }}
FILTER: "[.jobs[] | select(.status==\"completed\" and .conclusion==\"failure\") | { status: .conclusion, matrix: .name}] | length"
run: |
FAILURE_COUNT=$(curl -X GET -s -u $USER $URL | jq "$FILTER")
echo "fails=$FAILURE_COUNT" >> $GITHUB_OUTPUT
echo Failure jobs count: $FAILURE_COUNT
- if: ${{ steps.status.outputs.fails > 0 }}
name: Fail
run: exit 1