SponsorBlock/.github/workflows/ci.yml

67 lines
1.8 KiB
YAML
Raw Normal View History

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
2021-09-20 08:13:41 +02:00
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
2019-12-30 01:24:05 +01:00
- 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
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
2021-09-20 08:13:41 +02:00
- uses: actions/upload-artifact@v2
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
2021-09-20 08:13:41 +02:00
- uses: montudor/action-zip@v1
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
2021-09-20 08:13:41 +02:00
- uses: actions/upload-artifact@v2
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
2021-09-20 08:13:41 +02:00
- uses: montudor/action-zip@v1
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
run: npm run build:chrome -- --env.stream=beta
2021-09-20 08:13:41 +02:00
- uses: actions/upload-artifact@v2
2020-02-20 17:39:06 +01:00
with:
name: ChromeExtensionBeta
path: dist
2021-09-20 08:13:41 +02:00
- uses: montudor/action-zip@v1
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
run: npm run build:firefox -- --env.stream=beta
2021-09-20 08:13:41 +02:00
- uses: actions/upload-artifact@v2
2020-02-20 17:39:06 +01:00
with:
name: FirefoxExtensionBeta
path: dist
2021-09-20 08:13:41 +02:00
- uses: montudor/action-zip@v1
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