-
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (75 loc) · 2.38 KB
/
Copy pathrelease.yml
File metadata and controls
96 lines (75 loc) · 2.38 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Release
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
jobs:
build-wasm:
name: Build WASM
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v2
- name: Generate parser
run: tree-sitter generate
- name: Build WASM
run: tree-sitter build --wasm
- name: Upload WASM to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: tree-sitter-htmlmustache.wasm
build-vscode-extension:
name: Build VS Code Extension
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v2
- name: Generate parser
run: tree-sitter generate
- name: Build WASM (needed by extension)
run: tree-sitter build --wasm
- name: Install extension dependencies
working-directory: lsp
run: pnpm install
- name: Build extension
working-directory: lsp
run: pnpm run build
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Package extension
working-directory: lsp
run: vsce package --out htmlmustache-lsp.vsix
- name: Upload extension to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: lsp/htmlmustache-lsp.vsix
- name: Publish to VS Code Marketplace
if: github.event_name == 'release'
working-directory: lsp
run: vsce publish --packagePath htmlmustache-lsp.vsix || echo "Version may already exist, skipping"
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Install ovsx
run: npm install -g ovsx
- name: Publish to Open VSX Registry
if: github.event_name == 'release'
working-directory: lsp
run: ovsx publish htmlmustache-lsp.vsix || echo "Version may already exist, skipping"
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}