File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 strategy :
1616 matrix :
1717 node : [16.x]
18- os :
19- - macos-latest
20- - ubuntu-latest
21- - windows-latest
22- include :
23- - node : 16.x
24- os : ubuntu-latest
25- checkBuild : true
26- runs-on : ${{ matrix.os }}
18+ runs-on : ubuntu-latest
2719 steps :
2820 - name : 🏗 Setup repo
2921 uses : actions/checkout@v2
4739 run : yarn build
4840
4941 - name : 🕵️ Validate code
50- if : ${{ matrix.checkBuild }}
42+ id : diff
5143 run : |
52- echo "⚠️ If this step fails, the build is outdated."
53- echo " > run 'yarn build' and commit changes"
54- git diff --stat --exit-code build
44+ if [ "$(git diff --ignore-space-at-eol build/ | wc -l)" -gt "0" ]; then
45+ echo "⚠️ Build is outdated, run `yarn build` and commit changes. Found:"
46+ git diff
47+ exit 1
48+ fi
49+
50+ - name : 🗂 Uploading build
51+ uses : actions/upload-artifact@v2
52+ if : ${{ failure() && steps.diff.conclusion == 'failure' }}
53+ with :
54+ name : build
55+ path : build/
You can’t perform that action at this time.
0 commit comments