-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
71 lines (59 loc) · 1.77 KB
/
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
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
name: Release
on:
push:
tags:
- v1.[0-9]+.[0-9]+
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout VSCodeVim
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Build
run: gulp webpack
- name: Test
run: |
gulp prepare-test
xvfb-run -a yarn test
- name: Build extension package
id: build_vsix
run: |
yarn package;
echo ::set-output name=vsix_path::$(ls *.vsix);
- name: Create release on GitHub
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload .vsix as release asset to GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.build_vsix.outputs.vsix_path }}
asset_name: ${{ steps.build_vsix.outputs.vsix_path }}
asset_content_type: application/zip
- name: Publish to VSCode Extension Marketplace
run: yarn run vsce publish --yarn
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
id: publishToOpenVSX
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}