-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (58 loc) · 1.76 KB
/
build.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
name: Componizer CI
env:
NODE_VERSION: "12.x"
DIST_VERSION: "0.0.7"
on:
push:
branches:
- master
jobs:
build_platform:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install
run: npm install
- name: Lint
run: npm run lint
- name: Package schematics
run: npm run sch:package
- name: Package extension
run: npm run ext:package
- name: Upload artifact
uses: actions/[email protected]
with:
name: componizer-schematics
path: ./dist/sch
- name: Upload extension
uses: actions/[email protected]
with:
name: componizer-extension
path: ./dist/componizer-${{ env.DIST_VERSION }}.vsix
publish_artifacts:
runs-on: ubuntu-latest
needs: [build_platform]
steps:
- name: Download schematics artifact
uses: actions/[email protected]
with:
name: componizer-schematics
- name: Download extension artifact
uses: actions/[email protected]
with:
name: componizer-extension
- name: Display the path
run: ls -l componizer-extension
shell: bash
- name: Publish extension
uses: JCofman/vscodeaction@master
with:
args: publish --packagePath ./componizer-extension/componizer-${{ env.DIST_VERSION }}.vsix -p ${{ secrets.VSCE_PUB_TOKEN }}
- name: Publish schematics
run: |
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
npm publish --access public componizer-schematics