-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.69 KB
/
build-extension.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
name: Build extension
on:
push:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
name: Build and package
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: |
npm install -g @vscode/vsce
npm ci
- name: Get NPM Version
id: package-version
uses: martinbeentjes/[email protected]
- name: Build extension
run: vsce package -o postscript-preview-${{ steps.package-version.outputs.current-version }}.vsix
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: postscript-preview-${{ steps.package-version.outputs.current-version }}.vsix
path: postscript-preview-${{ steps.package-version.outputs.current-version }}.vsix
if-no-files-found: error
- name: Create release with artifact
if: ${{ success() && steps.package-version.outputs.current-version }}
uses: softprops/action-gh-release@v1
with:
name: Release v${{ steps.package-version.outputs.current-version }}
tag_name: v${{ steps.package-version.outputs.current-version }}
draft: false
files: postscript-preview-${{ steps.package-version.outputs.current-version }}.vsix