Skip to content

7.0.0

7.0.0 #111

Workflow file for this run

name: Release
permissions:
contents: write
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: Set variables
run: echo "PROJECT_VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
- name: Build all targets
run: |
make build
sudo chown -R $(id -u):$(id -g) ./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 --channel unlisted --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
# Read docs on https://github.com/softprops/action-gh-release
- name: Publish release on GitHub
uses: softprops/action-gh-release@v1
with:
# Use tag name from `package.json`
# WARNING: source code in release will be bound to this tag,
# so if any changes in code been inserted, we must create another version and tag
tag_name: v${{ env.PROJECT_VERSION }}
name: v${{ env.PROJECT_VERSION }}
# Use current commit hash, instead of main branch
target_commitish: ${{ github.sha }}
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