-
Notifications
You must be signed in to change notification settings - Fork 22
44 lines (40 loc) · 1.31 KB
/
publish.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
# More information: https://github.com/HaaLeo/publish-vscode-extension
name: Publish Extension
on:
push:
tags:
- "v*"
env:
IS_PRE_RELEASE: ${{ endsWith(github.ref_name, 'pre-release') }}
jobs:
publish:
name: Publish Extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- name: Publish to Visual Studio Marketplace
id: publishToVSM
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
preRelease: ${{ env.IS_PRE_RELEASE }}
- name: Publish to Open VSX Registry
if: ${{ ! fromJSON(env.IS_PRE_RELEASE) }}
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OVSX_TOKEN }}
registryUrl: https://open-vsx.org
extensionFile: ${{ steps.publishToVSM.outputs.vsixPath }}
- name: Create draft GitHub Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
preRelease: ${{ env.IS_PRE_RELEASE }}
generateReleaseNotes: true
artifacts: "${{ steps.publishToVSM.outputs.vsixPath }}"