@@ -100,15 +100,24 @@ jobs:
100
100
- run : npm ci
101
101
working-directory : editors/code
102
102
103
- - run : npx vsce package -o "../../dist/rust-analyzer-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }}
103
+ - name : Package Extension (release)
104
+ if : github.ref == 'refs/heads/release'
105
+ run : npx vsce package -o "../../dist/rust-analyzer-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }}
106
+ working-directory : editors/code
107
+
108
+ - name : Package Extension (nightly)
109
+ if : github.ref != 'refs/heads/release'
110
+ run : npx vsce package -o "../../dist/rust-analyzer-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }} --pre-release
104
111
working-directory : editors/code
105
112
106
113
- if : matrix.target == 'x86_64-unknown-linux-gnu'
107
114
run : rm -rf editors/code/server
108
115
109
- - if : matrix.target == 'x86_64-unknown-linux-gnu'
110
- run : npx vsce package -o ../../dist/rust-analyzer.vsix
111
- working-directory : editors/code
116
+ - if : matrix.target == 'x86_64-unknown-linux-gnu' && github.ref == 'refs/heads/release'
117
+ run : npx vsce package -o ../../dist/rust-analyzer-no-server.vsix
118
+
119
+ - if : matrix.target == 'x86_64-unknown-linux-gnu' && github.ref != 'refs/heads/release'
120
+ run : npx vsce package -o ../../dist/rust-analyzer-no-server.vsix --pre-release
112
121
113
122
- name : Run analysis-stats on rust-analyzer
114
123
if : matrix.target == 'x86_64-unknown-linux-gnu'
@@ -151,7 +160,14 @@ jobs:
151
160
- run : npm ci
152
161
working-directory : editors/code
153
162
154
- - run : npx vsce package -o "../../dist/rust-analyzer-alpine-x64.vsix" --target alpine-x64
163
+ - name : Publish Extension (release)
164
+ if : github.ref == 'refs/heads/release'
165
+ run : npx vsce package -o "../../dist/rust-analyzer-alpine-x64.vsix" --target alpine-x64
166
+ working-directory : editors/code
167
+
168
+ - name : Publish Extension (nightly)
169
+ if : github.ref != 'refs/heads/release'
170
+ run : npx vsce package -o "../../dist/rust-analyzer-alpine-x64.vsix" --target alpine-x64 --pre-release
155
171
working-directory : editors/code
156
172
157
173
- run : rm -rf editors/code/server
@@ -223,11 +239,19 @@ jobs:
223
239
name : ${{ env.TAG }}
224
240
token : ${{ secrets.GITHUB_TOKEN }}
225
241
242
+ - run : rm dist/rust-analyzer-no-server.vsix
243
+
226
244
- run : npm ci
227
245
working-directory : ./editors/code
228
246
229
- - name : Publish Extension
247
+ - name : Publish Extension (release)
230
248
if : github.ref == 'refs/heads/release'
231
249
working-directory : ./editors/code
232
250
# token from https://dev.azure.com/rust-analyzer/
233
251
run : npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
252
+
253
+ - name : Publish Extension (nightly)
254
+ # check specifically for nightly in case someone triggers a release on a feature branch
255
+ if : github.ref == 'refs/heads/nightly'
256
+ working-directory : ./editors/code
257
+ run : npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix --pre-release
0 commit comments