-
Notifications
You must be signed in to change notification settings - Fork 37
47 lines (38 loc) · 1.28 KB
/
vse-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
name: Release Extension
on:
workflow_dispatch:
jobs:
build-and-publish:
if: startsWith(github.ref, 'refs/heads/release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Setup Nerdbank.GitVersioning
uses: dotnet/nbgv@v0.4.1
id: nbgv
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Build + Package extension
run: |
npm ci
npx vsce package --no-git-tag-version ${{ steps.nbgv.outputs.NpmPackageVersion }}
env:
EXTENSION_VERSION: ${{ steps.nbgv.outputs.NpmPackageVersion }}
- name: Create Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: ${{ contains(steps.nbgv.outputs.NpmPackageVersion, '-preview') }}
title: Release ${{ steps.nbgv.outputs.NpmPackageVersion }}
automatic_release_tag: ${{ steps.nbgv.outputs.NpmPackageVersion }}
files: |
*.vsix
- name: Publish debug extension to VSCode Marketplace
run: |
npx vsce publish -i ./$(ls *.vsix) -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}