Skip to content

v1.0.1

v1.0.1 #3

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