-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (56 loc) · 1.86 KB
/
package-extension.yaml
File metadata and controls
72 lines (56 loc) · 1.86 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
72
name: Package Extension
on:
release:
types: [published]
workflow_dispatch:
jobs:
package-extension:
runs-on: ubuntu-latest
steps:
# setup
- name: Checkout repo
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y jq
sudo apt-get install -y moreutils
- name: Set version
id: vars
run: |
git fetch --tags
git describe --tags `git rev-list --tags --max-count=1`
echo "VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
- name: Remove unnecessary files
run: |
rm -rf .git
rm -rf .github
rm -f cliff.toml
mv LICENSE LICENSE.txt
rm -rf media/examples
- name: Copy files separately
run: |
mkdir chrome firefox
rsync -av --exclude='chrome' --exclude='firefox' * chrome/
rsync -av --exclude='chrome' --exclude='firefox' * firefox/
# package for chrome
- name: Remove MV2 background page
run: |
rm -f chrome/views/firefox.html
- name: Remove MV2 manifest.json entries
run: |
jq 'del(.browser_specific_settings, .background.page)' chrome/manifest.json | sponge chrome/manifest.json
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: flightdata-ext-${{ env.VERSION }}_chrome
path: chrome
# package for firefox
- name: Remove MV3 service_worker from manifest.json
run: |
jq 'del(.background.service_worker)' firefox/manifest.json | sponge firefox/manifest.json
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: flightdata-ext-${{ env.VERSION }}_firefox
path: firefox