File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 push :
44 branches :
55 - main
6+ tags :
7+ - v*
68 pull_request :
79 branches :
810 - main
5052 run : pnpm install
5153 - name : Run unit-tests
5254 run : pnpm run test
55+
56+ bundle :
57+ runs-on : ubuntu-latest
58+ needs :
59+ - typos
60+ - tests
61+ steps :
62+ - name : Check out repository
63+ uses : actions/checkout@v4
64+ - name : Set up pnpm
65+ uses : pnpm/action-setup@v4
66+ with :
67+ version : ${{ env.PNPM_VERSION }}
68+ - name : Set up Node
69+ uses : actions/setup-node@v4
70+ with :
71+ node-version : ${{ env.NODE_VERSION }}
72+ cache : pnpm
73+ - name : Install dependencies
74+ run : pnpm install
75+ - name : Clean up bundle
76+ run : pnpm run clean
77+ - name : Build and bundle code
78+ run : pnpm run build
79+ - name : Check committed bundle
80+ run : |
81+ diffs="$(git diff --ignore-space-at-eol --text ./dist/)"
82+ if [ -f "./dist/index.js" -a -z "$diffs" ]; then
83+ echo "Committed bundle is up-to-date!"
84+ exit 0
85+ fi
86+
87+ echo "Committed bundle is not up-to-date!"
88+ echo ""
89+ echo "$diffs"
90+ exit 1
You can’t perform that action at this time.
0 commit comments