-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (43 loc) · 1.39 KB
/
publish.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
name: Build, test and publish extension
on:
workflow_dispatch:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies and update @flyde/* packages
run: |
npm ci
npm update --scope=@flyde\
- name: Commit package.json if updated
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add package.json package-lock.json
git diff-index --quiet HEAD || git commit -m "Update @flyde/* packages"
git push origin main
- name: Build extension
run: npm run build
- name: Test extension
run: xvfb-run -a npm run test
- name: Bump minor version
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
npm version minor -m "Bump version to %s"
git push origin main
- name: Package and publish extension
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
run: |
npm install -g @vscode/vsce
vsce publish -p $VSCE_TOKEN