-
Notifications
You must be signed in to change notification settings - Fork 370
71 lines (63 loc) · 1.68 KB
/
Copy pathbuild.yaml
File metadata and controls
71 lines (63 loc) · 1.68 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
name: build
on:
push:
branches:
- main
- release/*
- develop/*
paths-ignore:
- ".github/**"
- ".gitignore"
- "**.md"
- "LICENSE"
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: 22
- name: Setup pnpm
env:
COREPACK_ENABLE_DOWNLOAD_PROMPT: 0
run: |
corepack enable
corepack install
pnpm --version
- name: Get pnpm store path
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- name: Cache pnpm store
uses: actions/cache@v6
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-${{ runner.arch }}-pnpm-${{ hashFiles('package.json', 'pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-pnpm-
- name: Package with Node
env:
CHROME_PEM: ${{ secrets.CHROME_PEM }}
run: |
mkdir dist
echo "$CHROME_PEM" > ./dist/scriptcat.pem
chmod 600 ./dist/scriptcat.pem
pnpm i --frozen-lockfile
pnpm run pack
- name: Archive production artifacts
uses: actions/upload-artifact@v6
with:
name: production-artifacts
path: |
dist/*.crx
dist/*.zip
- name: Archive extension
uses: actions/upload-artifact@v6
with:
name: scriptcat-chrome-extension
path: |
dist/ext/*