aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/ci.yml
blob: bc7a3123f8caee2a00e75381b35f0c4a9134e36c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
        run: cp config.json.example config.json

      # Create Chrome artifacts
      - name: Create Chrome artifacts
        run: npm run build
      - uses: actions/upload-artifact@v1
        with:
          name: Chrome Extension
          path: dist

      # Create Firefox artifacts
      - name: Move manifest
        run: mv manifest.json manifest.json.original
      - name: Combine manifest for Firefox
        run: jq -s '.[0] * .[1]' manifest.json.original firefox_manifest-extra.json > manifest.json
      - name: Create Firefox artifacts
        run: npm run build
      - uses: actions/upload-artifact@v1
        with:
          name: Firefox Extension
          path: dist