File tree Expand file tree Collapse file tree 4 files changed +59
-24
lines changed Expand file tree Collapse file tree 4 files changed +59
-24
lines changed Original file line number Diff line number Diff line change 2626 - run : npm ci
2727 - run : npm run build
2828 - run : npm run format-check
29- - run : npm test
30- - name : Verify no unstaged changes
31- if : runner.os != 'windows'
32- run : __tests__/verify-no-unstaged-changes.sh
29+ - run : npm test
Original file line number Diff line number Diff line change 1+ # `dist/index.js` is a special file in Actions.
2+ # When you reference an action with `uses:` in a workflow,
3+ # `index.js` is the code that will run.
4+ # For our project, we generate this file through a build process from other source files.
5+ # We need to make sure the checked-in `index.js` actually matches what we expect it to be.
6+ name : Check dist/
7+
8+ on :
9+ push :
10+ branches :
11+ - main
12+ paths-ignore :
13+ - ' **.md'
14+ pull_request :
15+ paths-ignore :
16+ - ' **.md'
17+ workflow_dispatch :
18+
19+ jobs :
20+ check-dist :
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - uses : actions/checkout@v2
25+
26+ - name : Set Node.js 12.x
27+ uses : actions/setup-node@v1
28+ with :
29+ node-version : 12.x
30+
31+ - name : Install dependencies
32+ run : npm ci
33+
34+ - name : Rebuild the dist/ directory
35+ run : npm run build
36+
37+ - name : Compare the expected and actual dist/ directories
38+ run : |
39+ if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
40+ echo "Detected uncommitted changes after build. See status below:"
41+ git diff
42+ exit 1
43+ fi
44+ id : diff
45+
46+ # If index.js was different than expected, upload the expected version as an artifact
47+ - uses : actions/upload-artifact@v2
48+ if : ${{ failure() && steps.diff.conclusion == 'failure' }}
49+ with :
50+ name : dist
51+ path : dist/
Original file line number Diff line number Diff line change 11name : Licensed
22
33on :
4- push : {branches: main}
5- pull_request : {branches: main}
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
610
711jobs :
812 test :
1721 curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
1822 sudo tar -xzf licensed.tar.gz
1923 sudo mv licensed /usr/local/bin/licensed
20- - run : licensed status
24+ - run : licensed status
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments