-
Notifications
You must be signed in to change notification settings - Fork 51
58 lines (53 loc) · 1.63 KB
/
PR_build_extension.yml
File metadata and controls
58 lines (53 loc) · 1.63 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
name: PR Build extension
on:
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'
- 'SECURITY.md'
- '.vscode/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/CODEOWNERS'
env:
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
PRISMA_TELEMETRY_INFORMATION: 'language-tools PR_build_extension.yml'
jobs:
build:
name: Build extension
# Only runs for Prisma repo, as this will fail on a PR from a fork
if: github.repository == 'prisma/language-tools'
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
tag_name: ${{ steps.names.outputs.tag_name }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
# Build the extension
- name: Install Dependencies
run: pnpm install
- name: Build all packages
run: pnpm build
- name: Replace Readme for marketplace
run: node scripts/change_readme.mjs insider
- name: Update VS Code extension name
run: |
node scripts/update_package_json_file_PR_build.mjs
env:
PR_NUMBER: ${{ github.event.number }}
- name: Build vsix
run: cd packages/vscode && pnpm package --out=prisma.vsix
# Upload to the current job run
# This is very limited: Only 90 days rentention and cannot get a link easily
- uses: actions/upload-artifact@v4
with:
name: pr-artifact
path: ./packages/vscode/*.vsix