-
Notifications
You must be signed in to change notification settings - Fork 26
99 lines (84 loc) · 2.3 KB
/
vscode-extension.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: VSCode Extension CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
workflow_dispatch:
permissions:
id-token: write
contents: write
jobs:
test:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: |
npm install
npm install -g vsce
npm run test-compile
release:
if: "!contains(github.event.head_commit.message, 'skip ci')"
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.VSCODE_TOKEN }}
if: github.event_name != 'pull_request'
- name: Setup Git
run: |
git config user.name "Gamunu Balagalla"
git config user.email "[email protected]"
if: github.event_name != 'pull_request'
- name: create changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.VSCODE_TOKEN }}
release-count: "0"
if: github.event_name != 'pull_request'
- name: create release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.VSCODE_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
outputs:
relVer: ${{ steps.changelog.outputs.tag }}
publish:
needs: [release]
name: Publish to VSCode Marketplace
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: compile typescript
run: |
npm install
npm run webpack
- name: Build the extension
run: |
npm install
npm install -g vsce
vsce package
# - name: Publish to marketplace
# run: vsce publish -p ${{ secrets.MARKETPLACE_SECRET }}