File tree Expand file tree Collapse file tree 2 files changed +141
-24
lines changed Expand file tree Collapse file tree 2 files changed +141
-24
lines changed Original file line number Diff line number Diff line change 13
13
env :
14
14
GITLAB_NPM_TOKEN : ${{secrets.GITLAB_NPM_TOKEN}}
15
15
jobs :
16
- build-check :
16
+ lint :
17
17
permissions : read-all
18
18
runs-on : ubuntu-latest
19
19
strategy :
@@ -34,20 +34,81 @@ jobs:
34
34
run : npm run lint
35
35
- name : ' Testing(Unit)'
36
36
run : npm run test:unit
37
+ package :
38
+ strategy :
39
+ matrix :
40
+ include :
41
+ - os : windows-latest
42
+ platform : win32
43
+ arch : x64
44
+ npm_config_arch : x64
45
+ - os : windows-latest
46
+ platform : win32
47
+ arch : ia32
48
+ npm_config_arch : ia32
49
+ - os : windows-latest
50
+ platform : win32
51
+ arch : arm64
52
+ npm_config_arch : arm
53
+ - os : ubuntu-latest
54
+ platform : linux
55
+ arch : x64
56
+ npm_config_arch : x64
57
+ - os : ubuntu-latest
58
+ platform : linux
59
+ arch : arm64
60
+ npm_config_arch : arm64
61
+ - os : ubuntu-latest
62
+ platform : linux
63
+ arch : armhf
64
+ npm_config_arch : arm
65
+ - os : ubuntu-latest
66
+ platform : alpine
67
+ arch : x64
68
+ npm_config_arch : x64
69
+ - os : macos-latest
70
+ platform : darwin
71
+ arch : x64
72
+ npm_config_arch : x64
73
+ - os : macos-latest
74
+ platform : darwin
75
+ arch : arm64
76
+ npm_config_arch : arm64
77
+ runs-on : ${{ matrix.os }}
78
+ needs : lint
79
+ env :
80
+ npm_config_arch : ${{ matrix.npm_config_arch }}
81
+ steps :
82
+ - uses : actions/checkout@v2
83
+ with :
84
+ ref : ${{ github.event.pull_request.head.sha }}
85
+ - name : Use Node.js
86
+ uses : actions/setup-node@v2
87
+ with :
88
+ node-version : 16.x
89
+ cache : ' npm'
90
+
91
+ - name : ' Installing Dependencies'
92
+ run : npm ci
93
+
37
94
- name : ' Building'
38
- run : ./build.sh "${{ secrets.OAUTHCLIENTID }}" "${{ secrets.OAUTHCLIENTSECRET }}"
39
- - name : ' Preparing VSCE'
40
- run : npm i -g vsce
95
+ run : npm run package -- --env CLIENTID=${{ secrets.OAUTHCLIENTID }} --env CLIENTSECRET=${{ secrets.OAUTHCLIENTSECRET }} && npm run ui:package
96
+
41
97
- name : ' Versioning'
42
98
id : version
99
+ shell : bash
43
100
run : echo "VERSION=1.0.0-beta.$(date +%s)" >> $GITHUB_OUTPUT
101
+
102
+ - id : targeting
103
+ name : Targeting
104
+ shell : pwsh
105
+ run : echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_OUTPUT
106
+
44
107
- name : ' Packaging'
45
108
id : packaging
46
109
run : |
47
- vsce package --pre-release --no-update-package-json --no-git-tag-version ${{ steps.version.outputs.VERSION }} && \
48
- echo "PKG_NAME=vscode-cnb-${{ steps.version.outputs.VERSION }}.vsix" >> $GITHUB_OUTPUT
49
- - name : Uploading the Package
50
- uses : actions/upload-artifact@v3
110
+ npx vsce package --pre-release --target ${{ steps.targeting.outputs.target }} --no-update-package-json --no-git-tag-version ${{ steps.version.outputs.VERSION }}
111
+ - uses : actions/upload-artifact@v2
51
112
with :
52
- name : ${{ steps.packaging .outputs.PKG_NAME }}
53
- path : ./${{ steps.packaging.outputs.PKG_NAME }}
113
+ name : ${{ steps.targeting .outputs.target }}
114
+ path : ' *.vsix '
Original file line number Diff line number Diff line change 13
13
14
14
jobs :
15
15
build :
16
- runs-on : ubuntu-latest
17
-
18
16
strategy :
19
17
matrix :
20
- node-version : [16.x]
21
- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
18
+ include :
19
+ - os : windows-latest
20
+ platform : win32
21
+ arch : x64
22
+ npm_config_arch : x64
23
+ - os : windows-latest
24
+ platform : win32
25
+ arch : ia32
26
+ npm_config_arch : ia32
27
+ - os : windows-latest
28
+ platform : win32
29
+ arch : arm64
30
+ npm_config_arch : arm
31
+ - os : ubuntu-latest
32
+ platform : linux
33
+ arch : x64
34
+ npm_config_arch : x64
35
+ - os : ubuntu-latest
36
+ platform : linux
37
+ arch : arm64
38
+ npm_config_arch : arm64
39
+ - os : ubuntu-latest
40
+ platform : linux
41
+ arch : armhf
42
+ npm_config_arch : arm
43
+ - os : ubuntu-latest
44
+ platform : alpine
45
+ arch : x64
46
+ npm_config_arch : x64
47
+ - os : macos-latest
48
+ platform : darwin
49
+ arch : x64
50
+ npm_config_arch : x64
51
+ - os : macos-latest
52
+ platform : darwin
53
+ arch : arm64
54
+ npm_config_arch : arm64
55
+ runs-on : ${{ matrix.os }}
22
56
steps :
23
57
- uses : actions/checkout@v2
24
- - name : Use Node.js ${{ matrix.node-version }}
58
+
59
+ - name : Use Node.js
25
60
uses : actions/setup-node@v2
26
61
with :
27
- node-version : ${{ matrix.node-version }}
62
+ node-version : 16.x
28
63
cache : ' npm'
29
- - name : ' Versioning'
30
- id : version
31
- run : echo "VERSION=${{ github.ref_name }}" | sed 's/v//' >> $GITHUB_OUTPUT
64
+
32
65
- name : ' Installing Dependencies'
33
66
run : npm ci
67
+
34
68
- name : ' Building'
35
- run : ./build.sh "${{ secrets.OAUTHCLIENTID }}" "${{ secrets.OAUTHCLIENTSECRET }}"
36
- - name : ' Preparing VSCE'
37
- run : npm i -g vsce
38
- - name : ' Publishing'
39
- run : vsce publish --no-git-tag-version --no-update-package-json -p ${{ secrets.VSCETOKEN }} ${{ steps.version.outputs.VERSION }}
69
+ run : npm run package -- --env CLIENTID=${{ secrets.OAUTHCLIENTID }} --env CLIENTSECRET=${{ secrets.OAUTHCLIENTSECRET }} && npm run ui:package
70
+
71
+ - name : ' Versioning'
72
+ id : version
73
+ shell : bash
74
+ run : echo "VERSION=${{ github.ref_name }}" | sed 's/v//' >> $GITHUB_OUTPUT
75
+
76
+ - id : targeting
77
+ name : Targeting
78
+ shell : pwsh
79
+ run : echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_OUTPUT
80
+
81
+ - name : ' Packaging'
82
+ run : npx vsce package --target ${{ steps.targeting.outputs.target }} --no-git-tag-version --no-update-package-json ${{ steps.version.outputs.VERSION }}
83
+
84
+ - name : ' Uploading'
85
+ uses : actions/upload-artifact@v2
86
+ with :
87
+ name : ${{ steps.targeting.outputs.target }}
88
+ path : ' *.vsix'
89
+
90
+ publish :
91
+ runs-on : ubuntu-latest
92
+ needs : build
93
+ steps :
94
+ - uses : actions/download-artifact@v2
95
+ - run : npx vsce publish --packagePath $(find . -iname *.vsix) -p ${{ secrets.VSCETOKEN }}
You can’t perform that action at this time.
0 commit comments