4
4
5
5
name : Deploy Extension
6
6
jobs :
7
- build-vsix :
7
+ publish-extension :
8
8
runs-on : ubuntu-latest
9
9
steps :
10
10
- uses : actions/checkout@v2
11
11
- uses : actions/setup-node@v1
12
12
with :
13
13
node-version : 17
14
14
- run : yarn install --immutable --immutable-cache --check-cache
15
+
15
16
- name : Package Extension
16
17
id : packageExtension
17
18
uses : HaaLeo/publish-vscode-extension@v1
@@ -21,42 +22,33 @@ jobs:
21
22
preRelease : ${{ github.event.action == 'prereleased' }}
22
23
yarn : true
23
24
25
+ # # Make sure the artifact is added to the release.
24
26
- name : Upload extension vsix to workflow artifacts
25
27
uses : actions/upload-artifact@v3
26
28
with :
27
29
name : haskell-${{ github.event.release.tag_name }}.vsix
28
30
path : ${{ steps.packageExtension.outputs.vsixPath }}
29
- outputs :
30
- vsixPath : ${{ steps.packageExtension.outputs.vsixPath }}
31
31
32
- # # If this is a release job, publish to VSCode,
33
- # # otherwise publish a pre-release to VSCode
34
- deploy-vs :
35
- runs-on : ubuntu-latest
36
- needs : [build-vsix]
37
- steps :
32
+ # # If this is a release job, publish to VSCode,
33
+ # # otherwise publish a pre-release to VSCode
38
34
- name : Publish to Visual Studio Marketplace
39
35
id : publishToVSMarketplace
40
36
uses : HaaLeo/publish-vscode-extension@v1
41
37
with :
42
38
pat : ${{ secrets.VS_MARKETPLACE_TOKEN }}
43
39
registryUrl : https://marketplace.visualstudio.com
44
- extensionFile : ${{ needs.build-vsix .outputs.vsixPath }}
40
+ extensionFile : ${{ steps.packageExtension .outputs.vsixPath }}
45
41
yarn : true
46
42
preRelease : ${{ github.event.action == 'prereleased' }}
47
43
48
- # # Publish to VSX iff this is a release
49
- deploy-vsx :
50
- runs-on : ubuntu-latest
51
- needs : [build-vsix]
52
- # Run this job only on release, VSX doesn't support pre-releases yet
53
- if : ${{ github.event.action == 'released' }}
54
- steps :
44
+ # Run this job only on release, VSX doesn't support pre-releases yet
55
45
- name : Publish to Open VSX Registry
56
46
id : publishToOpenVSX
47
+ if : ${{ github.event.action == 'released' }}
57
48
continue-on-error : true
58
49
uses : HaaLeo/publish-vscode-extension@v1
59
50
with :
60
51
pat : ${{ secrets.OPEN_VSX_TOKEN }}
61
- extensionFile : ${{ needs.build-vsix .outputs.vsixPath }}
52
+ extensionFile : ${{ steps.packageExtension .outputs.vsixPath }}
62
53
yarn : true
54
+ preRelease : ${{ github.event.action == 'prereleased' }}
0 commit comments