-
Notifications
You must be signed in to change notification settings - Fork 94
52 lines (47 loc) · 1.24 KB
/
build.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
name: Build
on:
push:
branches:
- master
tags:
- "*.*.*"
jobs:
build:
strategy:
matrix:
include:
- target: win32-x64
- target: linux-x64
- target: darwin-x64
- target: darwin-arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set node 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install
uses: borales/actions-yarn@v5
with:
cmd: install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build
run: |
node ./build/prepare.js ${{ matrix.target }}
npx vsce package -o VSCode-EmmyLua-${{ matrix.target }}.vsix --target ${{ matrix.target }}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: VSCode-EmmyLua-${{ matrix.target }}
path: ${{ github.workspace }}/VSCode-EmmyLua*.vsix
publish:
runs-on: ubuntu-latest
needs: [build]
if: success() && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
- run: npx vsce publish --packagePath $(find VSCode-EmmyLua* -iname "*.vsix")
env:
VSCE_PAT: ${{ secrets.VSCE_ACCESS_TOKEN }}