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