-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (38 loc) · 1.14 KB
/
release.yaml
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
name: Release to Visual Studio Code Extension Marketplace
on:
release:
types:
- published
jobs:
package:
name: Package VS Code Extension and Publish to the Marketplace
runs-on: ubuntu-latest
if: success() && startsWith(github.ref, 'refs/tags/')
steps:
- name: checkout extension repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Set up Git configuration
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: setup nodejs
uses: actions/setup-node@v4
with:
node-version: 22
- name: npm install
run: npm install
- name: Publish Pre-release to the Marketplace
run: |
npx vsce publish ${{ github.ref_name }} --pre-release
if: "github.event.release.prerelease"
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Publish to the Marketplace
run: |
npx vsce publish ${{ github.ref_name }}
if: "!github.event.release.prerelease"
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}