-
Notifications
You must be signed in to change notification settings - Fork 115
44 lines (44 loc) · 1.52 KB
/
auto-release.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
name: Publish release
on:
push:
branches: [ master ]
paths: [ 'package.json' ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: start X server
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: detect version
uses: EndBug/version-check@v1
id: check
with:
diff-search: true # seach the diff content with version
- if: steps.check.outputs.changed == 'true'
run: npm ci
- if: steps.check.outputs.changed == 'true'
run: npm test
- name: package
if: steps.check.outputs.changed == 'true'
run: npm run package
- name: publish to Github
uses: ncipollo/release-action@v1
if: steps.check.outputs.changed == 'true'
with:
artifacts: "vscode-clangd-*.vsix"
tag: ${{ steps.check.outputs.version }}
commit: ${{ steps.check.outputs.commit }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: publish to VSCode Marketplace
if: steps.check.outputs.changed == 'true'
# The token will expire. Regenerate it at:
# https://llvm-vs-code-extensions.visualstudio.com/_usersSettings/tokens.
run: npm run publish -- -p "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}"
- name: publish to OpenVSX
if: steps.check.outputs.changed == 'true'
# The token will expire. Regenerate it at:
# https://open-vsx.org/user-settings/tokens
run: npm run publish-openvsx -- -p "${{ secrets.OPENVSX_TOKEN }}"