2019-12-30 01:24:05 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Create artifacts
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
# Initialization
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
- run: npm install
|
|
|
|
- name: Copy configuration
|
2020-02-04 05:13:40 +01:00
|
|
|
run: cp config.json.example config.json
|
2019-12-30 01:24:05 +01:00
|
|
|
|
|
|
|
# Create Chrome artifacts
|
|
|
|
- name: Create Chrome artifacts
|
|
|
|
run: npm run build
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: Chrome Extension
|
2020-02-04 05:11:01 +01:00
|
|
|
path: dist
|
2019-12-30 01:24:05 +01:00
|
|
|
|
|
|
|
# Create Firefox artifacts
|
|
|
|
- name: Move manifest
|
2020-02-04 05:23:26 +01:00
|
|
|
run: mv ./dist/manifest.json ./dist/manifest.json.original
|
2019-12-30 01:24:05 +01:00
|
|
|
- name: Combine manifest for Firefox
|
2020-02-04 05:25:50 +01:00
|
|
|
run: jq -s '.[0] * .[1]' ./dist/manifest.json.original ./dist/firefox_manifest-extra.json > manifest.json
|
2019-12-30 01:24:05 +01:00
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: Firefox Extension
|
2020-02-04 05:11:01 +01:00
|
|
|
path: dist
|
2019-12-30 01:24:05 +01:00
|
|
|
|