generated from n13org/vscode-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (62 loc) · 1.59 KB
/
ci.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
56
57
58
59
60
61
62
63
64
65
66
67
name: CI
on:
push:
branches:
- master
- github-workflow
tags:
- "v*"
# release:
# types:
# - created
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12' ] #, '14', '16' ]
name: Use Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
# cache: 'npm'
# - run: npm install --save-dev
# - run: npm run vsce-package
- run: npm install -g vsce
- run: vsce package # --out ./output
# https://github.com/actions/upload-artifact
- uses: actions/upload-artifact@v2
with:
name: vsix
path: ./*.vsix
if-no-files-found: error
retention-days: 5
# - name: VSCE Publish
# # if: success() && startsWith( github.ref, 'refs/tags/releases/' )
# if: success() && startsWith(github.ref, 'refs/tags/v')
# run: vsce publish
# env:
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: build
name: Publish to Marketplace
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: lts/*
- run: npm install -g vsce
- uses: actions/download-artifact@master
with:
name: vsix
path: ./
- name: VSCE Publish
run: vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}