-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (42 loc) · 1.15 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
name: CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Update version and changelog
run: npx semantic-release --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package VSIX
run: npx vsce package
- uses: actions/upload-artifact@v2
with:
name: VSIX
path: "*.vsix"
- name: Commit new version and changelog
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git add package.json CHANGELOG.md
git commit -m "chore: Update version & changelog. [skip ci]"
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Rename VSIX
run: mv *.vsix code4z.vsix
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
run: npx vsce publish
env:
VSCE_PAT: $