-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.53 KB
/
build_and_publish_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
name: Buld & Publish (Firefox)
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20
- name: Create a source-code zip file
run: zip -r source-code.zip ./**
- name: Install dependencies
run: npm install
- name: Build the extension
run: npm run build:ff
- name: Fix firefox manifest
run: sed -i 's/background\/scripts\.js/background\/service_worker\.js/g' dist/firefox/manifest.json
- name: Put the extension into a zip file
run: zip -r release_firefox.zip dist/firefox
- name: Upload to Mozilla Addons
uses: browser-actions/release-firefox-addon@latest
with:
addon-id: "ghcss-extension@bims.sh"
addon-path: "release_firefox.zip"
source-path: "source-code.zip"
approval-note: |
The instructions are inside the README.md under the "Build" section.
Also make sure to check the note right below them.
auth-api-issuer: ${{ secrets.FIREFOX_KEY }}
auth-api-secret: ${{ secrets.FIREFOX_SECRET }}
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./release_firefox.zip
asset_name: release_firefox.zip
asset_content_type: application/zip