Skip to content

Fix resvg changes on macOS #281

Fix resvg changes on macOS

Fix resvg changes on macOS #281

Workflow file for this run

name: Extension CI/CD
on:
push:
paths:
- .github/workflows/extension.yaml
- extension/**
tags:
- v*
branches-ignore:
- crowdin-*
pull_request:
paths:
- .github/workflows/extension.yaml
- extension/**
defaults:
run:
working-directory: extension
shell: bash
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure cache
uses: actions/cache@v4
with:
path: |
~/.cache/yarn
~/.config/yarn
./extension/.parcel-cache
key: ${{ runner.os }}-yarn-lint-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint the project
run: yarn lint
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure cache
uses: actions/cache@v4
with:
path: |
~/.cache/yarn
~/.config/yarn
./extension/.parcel-cache
key: ${{ runner.os }}-yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Set the version
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]
then
VERSION=${GITHUB_REF/refs\/tags\/v}
sed -i "s/\"version\": \"0.0.0\"/\"version\": \"$VERSION\"/g" package.json
sed -i "s/\"version\": \"0.0.0\"/\"version\": \"$VERSION\"/g" src/manifest.json
fi
- name: Build the project
run: yarn build
- name: Upload artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
path: extension/dist/*.zip
# Add auto-publishing to AMO once web-ext officially supports and recommends that
# This also includes uploading source code because it is needed for built/bundled extensions
# See: https://github.com/mozilla/web-ext/issues/2451