Skip to content

as startpage

as startpage #14

Workflow file for this run

name: Build
on:
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Install web-ext
run: npm install --global web-ext
- name: Inject environment variables into weather.js
run: |
sed -i 's/const key = "";/const key = "${{ secrets.KEY }}";/' js/weather.js
sed -i 's/const latitude = 0;/const latitude = ${{ secrets.LATITUDE }};/' js/weather.js
sed -i 's/const longitude = 0;/const longitude = ${{ secrets.LONGITUDE }};/' js/weather.js
- name: Build and Sign extension
env:
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }}
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }}
run: |
web-ext sign \
--channel=unlisted \
--api-key=$FIREFOX_JWT_ISSUER \
--api-secret=$FIREFOX_JWT_SECRET
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: firefox-extension
path: web-ext-artifacts/*.xpi