File tree Expand file tree Collapse file tree 3 files changed +21
-19
lines changed Expand file tree Collapse file tree 3 files changed +21
-19
lines changed Original file line number Diff line number Diff line change 11
11
- develop
12
12
13
13
jobs :
14
- build_redcode :
14
+ build :
15
15
strategy :
16
16
matrix :
17
17
os :
@@ -22,13 +22,17 @@ jobs:
22
22
steps :
23
23
- name : Checkout branch
24
24
uses : actions/checkout@v2
25
+
25
26
- name : Install Node.js
26
27
uses : actions/setup-node@v1
27
28
with :
28
29
node-version : 14.x
30
+
29
31
- name : Install dependencies
30
32
run : npm install --locked
33
+
31
34
- name : Build extension
32
35
run : npm run build
36
+
33
37
- name : Verify the build did not modify any files
34
38
run : git diff --exit-code HEAD -- .
Original file line number Diff line number Diff line change 5
5
types :
6
6
- published
7
7
8
- defaults :
9
- run :
10
- working-directory : redcode
11
-
12
8
env :
13
9
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
14
10
15
11
jobs :
16
12
publish :
17
- if : startsWith(github.ref, 'refs/tags/redcode-v')
18
13
runs-on : ubuntu-latest
19
14
steps :
20
15
- name : Checkout
21
16
uses : actions/checkout@v2
17
+
22
18
- name : Get Release
23
- id : get_release
24
- uses :
bruceadams/[email protected]
25
- - name : Get release tag
26
- id : get_version
27
- run : echo "::set-output name=package::$(echo ${{ github.ref }} | cut -d '/' -f 3)"
19
+ id : release
20
+ uses :
bruceadams/[email protected]
21
+
28
22
- name : Install Node.js
29
23
uses : actions/setup-node@v1
30
24
with :
31
- node-version : 10.x
25
+ node-version : 14.x
26
+
32
27
- name : Install dependencies
33
28
run : npm install --locked
29
+
34
30
- name : Package extension
35
- run : npm run package -- --out ${{ steps.get_version.outputs.package }}.vsix
31
+ run : npm run package -- --out ${{ steps.release.outputs.tag_name }}.vsix
32
+
36
33
- name : Upload extension to Github
37
34
uses : actions/upload-release-asset@v1
38
35
with :
39
- upload_url : ${{ steps.get_release .outputs.upload_url }}
40
- asset_path : redcode/ ${{ steps.get_version .outputs.package }}.vsix
41
- asset_name : ${{ steps.get_version .outputs.package }}.vsix
36
+ upload_url : ${{ steps.release .outputs.upload_url }}
37
+ asset_path : ${{ steps.release .outputs.tag_name }}.vsix
38
+ asset_name : ${{ steps.release .outputs.tag_name }}.vsix
42
39
asset_content_type : application/vsix
40
+
43
41
- name : Publish extension to VSCode marketplace
44
- run : npm run deploy
42
+ run : npm run publish
45
43
env :
46
44
VSCE_PAT : ${{ secrets.VSCE_PAT }}
Original file line number Diff line number Diff line change 34
34
],
35
35
"extensions" : [
36
36
" .red" ,
37
- " .redcode" ,
37
+ " .redcode"
38
38
],
39
39
"configuration" : " ./language-configuration.json"
40
40
}
50
50
"scripts" : {
51
51
"build" : " npx js-yaml syntaxes/redcode.tmLanguage.yaml > syntaxes/redcode.tmLanguage.json" ,
52
52
"package" : " vsce package" ,
53
- "deploy " : " vsce publish"
53
+ "publish " : " vsce publish"
54
54
},
55
55
"devDependencies" : {
56
56
"js-yaml" : " ^3.14.0" ,
You can’t perform that action at this time.
0 commit comments