File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1111 - patch
1212 - minor
1313 - major
14+ - keep
15+ push :
16+ branches :
17+ - main
18+ paths :
19+ - ' **.json'
1420
1521jobs :
1622 release :
@@ -22,24 +28,31 @@ jobs:
2228 run : | # shell
2329 npm i
2430
25- - name : Setup Github Actions # allow use of `git push`
26- run : | # shell
27- git config --global user.name "RedCMD"
28- git config --global user.email "theredcmd@gmail.com"
29- git add .
30- git diff-index --quiet HEAD || git commit -m "Sync Github Actions"
31-
3231 - name : Run Tests # check grammars are working
3332 run : | # shell
3433 npm run test
3534
35+ - name : Setup Github Actions # allow use of `git push`
36+ run : | # shell
37+ git config user.name "github-actions[bot]"
38+ git config user.email "github-actions[bot]@users.noreply.github.com"
39+ git add .
40+ git diff-index --quiet HEAD || git commit -m "Sync Github Actions" || exit 0
41+
3642 - name : Package Extension # `.vsix` file
3743 run : | # shell
38- npm run package --- ${{ github.event.inputs.version }}
44+ if [ "${{ github.event.inputs.version }}" = "keep" ]; then
45+ npm run package
46+ elif [ "${{ github.event.inputs.version }}" = "" ]; then
47+ npm run package --- patch --pre-release
48+ else
49+ npm run package --- ${{ github.event.inputs.version }}
50+ fi
3951 git push --follow-tags
40- echo " VERSION=$(node -p "require('./package.json').version")" >> " $GITHUB_ENV"
52+ echo VERSION=$(node -p "require('./package.json').version") >> $GITHUB_ENV
4153
4254 - name : Generate Release # create release page on github with `.vsix` file
55+ if : github.event.inputs.version
4356 run : | # shell
4457 gh release create v$VERSION --generate-notes json-embedded-languages-$VERSION.vsix
4558 env :
You can’t perform that action at this time.
0 commit comments