Add deterministic module IDs for consistent webpack builds across platforms #148
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
| # This workflow verifies lib/main.js has latest changes from src/*.ts | |
| on: pull_request | |
| jobs: | |
| check-lib: | |
| name: Build main.js and diff | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Validate build | |
| run: | | |
| npm install | |
| npm run build | |
| - name: Check if main.js has differences | |
| run: echo "diff=$(git diff --ignore-space-at-eol --text lib/main.js | wc -l)" >> $GITHUB_ENV | |
| # If main.js was different than expected, upload the actual version | |
| - name: Upload actual main.js | |
| if: ${{ env.diff > 0}} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: main.js | |
| path: lib/main.js | |