File tree Expand file tree Collapse file tree 5 files changed +86
-2
lines changed Expand file tree Collapse file tree 5 files changed +86
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Check dist
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - main
8+ - ' releases/*'
9+
10+ jobs :
11+ verify-build : # make sure the checked in dist/ folder matches the output of a rebuild
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v2
16+ with :
17+ ref : ${{ github.event.pull_request.head.sha }}
18+
19+ - name : Read .nvmrc
20+ id : nvm
21+ run : echo ::set-output name=NVMRC::$(cat .nvmrc)
22+
23+ - name : Setup Node.js
24+ uses : actions/setup-node@v1
25+ with :
26+ node-version : ${{ steps.nvm.outputs.NVMRC }}
27+
28+ - name : Install NPM dependencies
29+ run : npm ci
30+
31+ - name : Rebuild the dist/ directory
32+ run : npm run package
33+
34+ - name : Compare the expected and actual dist/ directories
35+ run : script/check-diff
36+ verify-index-js : # make sure the entrypoint js files run on a clean machine without compiling first
37+ runs-on : ubuntu-latest
38+ steps :
39+ - uses : actions/checkout@v2
40+ with :
41+ ref : ${{ github.event.pull_request.head.sha }}
42+
43+ - uses : ./
44+ with :
45+ milliseconds : 1000
Original file line number Diff line number Diff line change 11{
22 "name" : " dependabot-updater-action" ,
3- "version" : " 0 .0.0" ,
3+ "version" : " 1 .0.0" ,
44 "private" : true ,
55 "description" : " Runs Dependabot workloads via GitHub Actions." ,
66 "main" : " src/main.ts" ,
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ usage () { echo " Usage: $0 -p [major | minor | patch]" 1>&2 ; exit 1; }
4+
5+ while getopts " p:" o; do
6+ case " ${o} " in
7+ p)
8+ patch_level=${OPTARG}
9+ (( patch_level == 'major' || patch_level == 'minor' || patch_level == 'patch'))
10+ ;;
11+ * )
12+ usage
13+ ;;
14+ esac
15+ done
16+
17+ echo " $patch_level "
18+
19+ if [[ -z " ${patch_level} " ]]; then
20+ usage
21+ fi
22+
23+ new_version=$( npm version " ${patch_level} " --no-git-tag-version)
24+ git checkout -b " ${new_version} " -release-notes
25+ git add package.json package-lock.json
26+ git commit -m " ${new_version} "
27+
28+ echo " Branch prepared for ${new_version} "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Make sure we notice any untracked files generated by the build
4+ git add --intent-to-add .
5+ git diff --quiet dist/
6+ retVal=$?
7+ if [ $retVal -ne 0 ]; then
8+ echo " Detected uncommitted changes after build:"
9+ git --no-pager diff dist/
10+ exit 1
11+ fi
You can’t perform that action at this time.
0 commit comments