build(deps-dev): Bump the npm-development group with 2 updates #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: Transpiled JavaScript | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
check-dist: | |
name: Check dist/ | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: .node-version | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build dist/ Directory | |
run: npm run bundle | |
- name: Compare Directories | |
id: compare | |
shell: bash | |
run: | | |
if [ ! -d dist/ ]; then | |
echo "::error::Expected dist/ directory does not exist" | |
exit 1 | |
fi | |
[ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -eq 0 ] && DIFF=false || DIFF=true | |
echo "diff=$DIFF" | tee -a "$GITHUB_OUTPUT" | |
if [ "$DIFF" == "true" ]; then | |
echo "::error::Detected uncommitted changes after build" | |
exit 1 | |
fi | |
- name: Upload dist/ | |
if: (!cancelled()) && steps.compare.outputs.diff == 'true' | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: dist | |
path: dist/ |