-
-
Notifications
You must be signed in to change notification settings - Fork 4
85 lines (68 loc) · 1.9 KB
/
release.yml
File metadata and controls
85 lines (68 loc) · 1.9 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
name: Package and Release VS Code Extension
on:
push:
branches:
- main
tags:
- 'v*' # Trigger on version tags like v1.0.0
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
fail-fast: false
name: ${{ matrix.os }}
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Go to install-locator
run: cd install-locator
- name: Install Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build Locator
run: ./install-locator/gradlew runtimeZip -p install-locator
- name: Upload result
uses: actions/upload-artifact@v4
with:
name: install-locator-${{ matrix.os }}
path: install-locator/build/image.zip
retention-days: 1
release:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
pattern: install-locator-*
- name: Unzip artifacts
run: |
unzip -o install-locator-*.zip
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Package extension
run: vsce package
- name: Upload VSIX to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.vsix'
tag: ${{ github.ref_name }}
overwrite: true
file_glob: true