Bump dependencies #142
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & check | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- assigned | |
- closed | |
- edited | |
- labeled | |
- locked | |
- ready_for_review | |
- review_request_removed | |
- review_requested | |
- unassigned | |
- unlabeled | |
- unlocked | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
outputs: | |
changes: ${{ steps.check-for-changes.outputs.diff }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
- name: Get Yarn cache folder path | |
id: yarn-cache-folder | |
run: echo "path=$( yarn cache dir )" >> $GITHUB_OUTPUT | |
- name: Set up Yarn cache | |
id: yarn-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-folder.outputs.path }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Node packages via Yarn | |
run: yarn install --frozen-lockfile --cache-folder ${{ steps.yarn-cache-folder.outputs.path }} | |
- name: Build | |
run: yarn build | |
- name: Check for changes | |
id: check-for-changes | |
run: | | |
{ | |
echo "diff<<EOF" | |
git diff | |
echo "EOF" | |
} >> "$GITHUB_OUTPUT" | |
check: | |
name: Check distribution file | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- if: ${{ needs.build.outputs.changes != '' }} | |
name: Fail | |
run: exit 1 |