-
Notifications
You must be signed in to change notification settings - Fork 90
55 lines (50 loc) · 1.95 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
on:
release:
types: [prereleased, released]
name: Deploy Extension
jobs:
publish-extension:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
## make sure this corresponds with the version in test.yml
node-version: latest
- run: yarn install --immutable --immutable-cache --check-cache
- name: Package Extension
id: packageExtension
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: stub
dryRun: true
preRelease: ${{ github.event.action == 'prereleased' }}
yarn: true
## Make sure the artifact is added to the release.
- name: Upload extension vsix to workflow artifacts
uses: actions/upload-artifact@v3
with:
name: haskell-${{ github.event.release.tag_name }}.vsix
path: ${{ steps.packageExtension.outputs.vsixPath }}
## If this is a release job, publish to VSCode Marketplace,
## otherwise publish a pre-release to VSCode Marketplace
- name: Publish to Visual Studio Marketplace
id: publishToVSMarketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.packageExtension.outputs.vsixPath }}
yarn: true
preRelease: ${{ github.event.action == 'prereleased' }}
## If this is a release job, publish to VSX Marketplace,
## otherwise publish a pre-release to VSX Marketplace
- name: Publish to Open VSX Registry
id: publishToOpenVSX
continue-on-error: true
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
extensionFile: ${{ steps.packageExtension.outputs.vsixPath }}
yarn: true
preRelease: ${{ github.event.action == 'prereleased' }}