-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (63 loc) · 2.12 KB
/
firefox.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: firefox
on:
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/build.yml
package:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Downloading built files
uses: actions/download-artifact@v3
with:
name: out
path: out
- name: Making firefox.manifest.json the main manifest
run: cp firefox.manifest.json manifest.json
- name: Getting manifest version
uses: notiz-dev/github-action-json-property@release
id: version
with:
path: "firefox.manifest.json"
prop_path: "version"
- name: Installing web-ext
run: npm install -g web-ext
- name: Preparing files for signing
run: mkdir xpi && cp -r icon out src LICENSE manifest.json xpi
- name: Signing via web-ext
run: cd xpi && web-ext sign --api-key ${{secrets.JWT_ISSUER}} --api-secret ${{secrets.JWT_SECRET}}
- name: Renaming extension
run: mv xpi/web-ext-artifacts/*.xpi ./great-on-deck-search.firefox.v${{steps.version.outputs.prop}}.xpi
- name: Uploading extension artifact
uses: actions/upload-artifact@v3
with:
name: xpi
path: great-on-deck-search.firefox.v${{steps.version.outputs.prop}}.xpi
release:
runs-on: ubuntu-latest
needs: package
steps:
- uses: actions/checkout@v3
- name: Getting manifest version
uses: notiz-dev/github-action-json-property@release
id: version
with:
path: "firefox.manifest.json"
prop_path: "version"
- name: Downloading xpi
uses: actions/download-artifact@v3
with:
name: xpi
path: ./
- name: Creating Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{secrets.GITHUB_TOKEN}}"
prerelease: false
automatic_release_tag: "v${{steps.version.outputs.prop}}+firefox"
files: great-on-deck-search.firefox.v${{steps.version.outputs.prop}}.xpi