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