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
|
2022-10-27 09:26:08 +02:00
|
|
|
- uses: actions/checkout@v3
|
2023-05-09 19:24:32 +02:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-10-27 09:26:08 +02:00
|
|
|
- uses: actions/setup-node@v3
|
2021-10-02 23:42:47 +02:00
|
|
|
with:
|
2022-06-13 19:34:39 +02:00
|
|
|
node-version: '18'
|
2021-10-02 23:42:47 +02:00
|
|
|
- run: npm ci
|
2019-12-30 01:24:05 +01:00
|
|
|
- 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
|
|
|
|
2020-12-14 22:34:18 +01:00
|
|
|
# Run linter
|
|
|
|
- name: Lint
|
|
|
|
run: npm run lint
|
|
|
|
|
2019-12-30 01:24:05 +01:00
|
|
|
# Create Chrome artifacts
|
|
|
|
- name: Create Chrome artifacts
|
2020-02-04 07:32:58 +01:00
|
|
|
run: npm run build:chrome
|
2022-10-27 09:26:08 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2019-12-30 01:24:05 +01:00
|
|
|
with:
|
2020-02-12 03:04:41 +01:00
|
|
|
name: ChromeExtension
|
2020-02-04 05:11:01 +01:00
|
|
|
path: dist
|
2020-02-20 18:17:51 +01:00
|
|
|
- run: mkdir ./builds
|
2022-07-21 06:13:32 +02:00
|
|
|
- uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28
|
2020-02-20 18:14:01 +01:00
|
|
|
with:
|
|
|
|
args: zip -qq -r ./builds/ChromeExtension.zip ./dist
|
2019-12-30 01:24:05 +01:00
|
|
|
|
|
|
|
# Create Firefox artifacts
|
2020-02-04 07:32:58 +01:00
|
|
|
- name: Create Firefox artifacts
|
|
|
|
run: npm run build:firefox
|
2022-10-27 09:26:08 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2019-12-30 01:24:05 +01:00
|
|
|
with:
|
2020-02-12 03:04:41 +01:00
|
|
|
name: FirefoxExtension
|
2020-02-04 05:11:01 +01:00
|
|
|
path: dist
|
2022-07-21 06:13:32 +02:00
|
|
|
- uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28
|
2020-02-20 18:14:01 +01:00
|
|
|
with:
|
|
|
|
args: zip -qq -r ./builds/FirefoxExtension.zip ./dist
|
2019-12-30 01:24:05 +01:00
|
|
|
|
2020-02-20 17:39:06 +01:00
|
|
|
# Create Beta artifacts (Builds with the name changed to beta)
|
|
|
|
- name: Create Chrome Beta artifacts
|
2022-02-06 03:20:53 +01:00
|
|
|
run: npm run build:chrome -- --env stream=beta
|
2022-10-27 09:26:08 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2020-02-20 17:39:06 +01:00
|
|
|
with:
|
|
|
|
name: ChromeExtensionBeta
|
|
|
|
path: dist
|
2022-07-21 06:13:32 +02:00
|
|
|
- uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28
|
2020-02-20 18:14:01 +01:00
|
|
|
with:
|
|
|
|
args: zip -qq -r ./builds/ChromeExtensionBeta.zip ./dist
|
|
|
|
|
2020-02-20 17:39:06 +01:00
|
|
|
- name: Create Firefox Beta artifacts
|
2022-02-06 03:20:53 +01:00
|
|
|
run: npm run build:firefox -- --env stream=beta
|
2022-10-27 09:26:08 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2020-02-20 17:39:06 +01:00
|
|
|
with:
|
|
|
|
name: FirefoxExtensionBeta
|
|
|
|
path: dist
|
2022-07-21 06:13:32 +02:00
|
|
|
- uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28
|
2020-02-20 18:14:01 +01:00
|
|
|
with:
|
|
|
|
args: zip -qq -r ./builds/FirefoxExtensionBeta.zip ./dist
|
2020-02-20 17:39:06 +01:00
|
|
|
|