-
Notifications
You must be signed in to change notification settings - Fork 6
92 lines (79 loc) · 2.43 KB
/
build.yaml
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
86
87
88
89
90
91
92
name: Build release
on:
push:
paths:
- src/**
- extension/**
- package.json
- pnpm-lock.yaml
workflow_dispatch:
inputs:
publish_amo_listed:
description: "Publish to AMO"
required: false
type: boolean
jobs:
build_chrome:
name: "Build Chrome Extension"
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ./.github/actions/setup-for-build
- name: Build
run: pnpm build
- name: Pack ZIP
run: pnpm pack:zip
- uses: actions/upload-artifact@v3
with:
name: Chrome Extension (Unsigned)
path: extension.zip
build_unlisted_firefox:
name: "Build Unlisted Firefox Extension"
runs-on: ubuntu-20.04
# Doesn't really need the Chrome build, but we can reuse its cache.
needs: build_chrome
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ./.github/actions/setup-for-build
- name: Build
run: pnpm build
env:
SZ_GECKO_ID: 13372607-2257-4360-8f51-5ce66fa73350
- name: Sign XPI
run: pnpm sign:firefox --channel unlisted
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
- uses: actions/upload-artifact@v3
with:
name: Firefox Extension (Signed)
path: web-ext-artifacts/*.xpi
build_amo_firefox:
name: "Build Firefox Extension for AMO"
runs-on: ubuntu-20.04
# Doesn't really need the Chrome build, but we can reuse its cache.
needs: build_chrome
# Only run on master branch AND if tagging or manually dispatching.
if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.publish_amo_listed == true
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ./.github/actions/setup-for-build
- name: Build
run: pnpm build
env:
SZ_GECKO_ID: 18365332-8485-4c04-9498-2843a41ab620
- name: Sign XPI and upload to AMO
run: pnpm sign:firefox --channel listed
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}