File tree 3 files changed +37
-27
lines changed
3 files changed +37
-27
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,22 @@ jobs:
16
16
steps :
17
17
- uses : actions/checkout@master
18
18
19
- - name : Install Dependencies
20
- run : |
19
+ - name : Install Dependencies # vsce etc
20
+ run : | # shell
21
21
npm i
22
- npm i @vscode/vsce -g
23
22
24
- - name : Build Extension
25
- run : npm run build
23
+ - name : Build Extension # build `extension.js` and `*.wasm` files
24
+ run : | # shell
25
+ npm run build
26
26
27
- - name : Setup Github Actions
28
- run : |
27
+ - name : Setup Github Actions # allow use of `git push`
28
+ run : | # shell
29
29
git config --global user.name "RedCMD"
30
30
git config --global user.email "[email protected] "
31
31
git add .
32
32
git diff-index --quiet HEAD || git commit -m "Sync Github Actions"
33
33
34
- - name : Publish Pre-release
35
- run : |
36
- vsce publish patch --pre-release -p ${{ secrets.VSCE_PAT }}
37
- git push
34
+ - name : Publish Pre-release # upload to Extension Marketplace
35
+ run : | # shell
36
+ npx vsce publish patch --pre-release -p ${{ secrets.VSCE_PAT }}
37
+ git push --follow-tags
Original file line number Diff line number Diff line change 5
5
inputs :
6
6
version :
7
7
description : ' Version'
8
- default : ' minor x.1.0 '
8
+ default : ' minor'
9
9
type : choice
10
10
options :
11
- - patch x.x.1
12
- - minor x.1.0
13
- - major 1.0.0
11
+ - patch
12
+ - minor
13
+ - major
14
14
15
15
jobs :
16
16
release :
17
17
runs-on : ubuntu-latest
18
18
steps :
19
19
- uses : actions/checkout@master
20
20
21
- - name : Install Dependencies
22
- run : |
21
+ - name : Install Dependencies # vsce etc
22
+ run : | # shell
23
23
npm i
24
- npm i @vscode/vsce -g
25
24
26
- - name : Build Extension
27
- run : npm run build
25
+ - name : Build Extension # build `extension.js` and `*.wasm` files
26
+ run : | # shell
27
+ npm run build
28
28
29
- - name : Setup Github Actions
30
- run : |
29
+ - name : Setup Github Actions # allow use of `git push`
30
+ run : | # shell
31
31
git config --global user.name "RedCMD"
32
32
git config --global user.email "[email protected] "
33
33
git add .
34
34
git diff-index --quiet HEAD || git commit -m "Sync Github Actions"
35
35
36
- - name : Publish Release
37
- run : |
38
- vsce publish ${{ github.event.inputs.version }} -p ${{ secrets.VSCE_PAT }}
39
- git push
36
+ - name : Package Extension # `.vsix` file
37
+ run : | # shell
38
+ npx vsce package ${{ github.event.inputs.version }}
39
+ git push --follow-tags
40
+ echo "VERSION=$(node -p "require('./package.json').version")" >> "$GITHUB_ENV"
41
+
42
+ - name : Generate Release # create release page on github with `.vsix` file
43
+ run : | # shell
44
+ gh release create v$VERSION --generate-notes tmlanguage-syntax-highlighter-$VERSION.vsix
45
+ env :
46
+ GH_TOKEN : ${{ github.token }}
47
+
48
+ - name : Publish Release # upload to Extension Marketplace
49
+ run : | # shell
50
+ npx vsce publish -p ${{ secrets.VSCE_PAT }} --packagePath tmlanguage-syntax-highlighter-$VERSION.vsix
Original file line number Diff line number Diff line change 40
40
"browser" : " ./out/web/extension.js" ,
41
41
"scripts" : {
42
42
"build" : " npm run compile && npm run compile-web && npm run generate-wasm" ,
43
- "version" : " git rm -f --ignore-unmatch *.vsix && vsce package && git add -f --ignore-errors *.vsix" ,
44
43
"package" : " vsce package" ,
45
44
"watch" : " tsc -watch -p ./" ,
46
45
"watch-web" : " webpack --watch" ,
You can’t perform that action at this time.
0 commit comments