DS-1156 | v8 - upgrade to TW v4 #24
This file contains hidden or 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 | |
| # Ensures only the latest run per branch is active | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| build: | |
| name: Build Package and Verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Fetch full history for diff | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build CSS | |
| run: npm run build | |
| - name: Verify no unexpected changes | |
| run: | | |
| # Fail if build generated changes in the repo | |
| git diff --exit-code | |
| if [ $? -ne 0 ]; then | |
| echo "\nERROR: Build artifacts are out of date. Please commit the generated changes.\n" | |
| git --no-pager diff | |
| exit 1 | |
| fi |