Skip to content

5.0.9

5.0.9 #95

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
# TODO: add job to upload new versions to stores with API
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/prepare-build
- name: Build all targets
run: make build
- name: Build CRX file for chromium
working-directory: "./build"
env:
CHROMIUM_CRX_PEM: ${{ secrets.CHROMIUM_CRX_PEM }}
run: |
echo "$CHROMIUM_CRX_PEM" > ./crx.pem
npx crx pack chromium -o linguist.crx -p ./crx.pem
ls -al ./
- name: Build XPI file for firefox-standalone
working-directory: "./build"
env:
AMO_KEY: ${{ secrets.AMO_KEY }}
AMO_SECRET: ${{ secrets.AMO_SECRET }}
run: |
mkdir ./AMO
npx web-ext sign --api-key "$AMO_KEY" --api-secret "$AMO_SECRET" --source-dir ./firefox-standalone --artifacts-dir ./AMO
mv AMO/*.xpi AMO/linguist.xpi
- name: Archive build files
uses: actions/upload-artifact@v4
id: upload-build-artifacts
if: always()
with:
name: build-files
path: build
- name: Publish release on GitHub
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/AMO/linguist.xpi
build/linguist.crx
build/*.zip
- name: Build static files for GitHub Pages
working-directory: "./build"
run: |
mkdir ./site
node ../scripts/genCrxUpdateManifest.js > ./site/chromium_updates.xml
# TODO: build index.html with landing page
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
email: [email protected]
build_dir: "./build/site"
branch: gh-pages