-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (48 loc) · 1.33 KB
/
asset.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
name: "Upload Release Asset"
on:
workflow_dispatch:
release:
types: [created, edited]
jobs:
get-release:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-release.outputs.version }}
upload_url: ${{ steps.get-release.outputs.upload_url }}
steps:
- uses: monkeyWie/[email protected]
id: get-release
with:
myToken: ${{ github.token }}
asset:
runs-on: ubuntu-latest
needs: [get-release]
steps:
- uses: actions/checkout@v3
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: latest
run_install: true
- name: Use Node.js 16.x
uses: actions/[email protected]
with:
node-version: 16.x
cache: "pnpm"
- name: Build the extension
run: |
pnpm build --target=chrome-mv3
pnpm build --target=firefox-mv2
- name: Upload
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get-release.outputs.tag_name }}
files: |
build/chrome-mv3-prod.zip
build/firefox-mv2-prod.zip