SponsorBlock/.github/workflows/ci.yml

63 lines
1.7 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
- 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
2020-02-04 07:32:58 +01:00
run: npm run build:chrome
2019-12-30 01:24:05 +01:00
- uses: actions/upload-artifact@v1
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
2020-02-20 18:14:01 +01:00
- uses: montudor/action-zip@v0.1.0
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
2019-12-30 01:24:05 +01:00
- uses: actions/upload-artifact@v1
with:
2020-02-12 03:04:41 +01:00
name: FirefoxExtension
2020-02-04 05:11:01 +01:00
path: dist
2020-02-20 18:14:01 +01:00
- uses: montudor/action-zip@v0.1.0
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
- uses: actions/upload-artifact@v1
with:
name: ChromeExtensionBeta
path: dist
2020-02-20 18:14:01 +01:00
- uses: montudor/action-zip@v0.1.0
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
- uses: actions/upload-artifact@v1
with:
name: FirefoxExtensionBeta
path: dist
2020-02-20 18:14:01 +01:00
- uses: montudor/action-zip@v0.1.0
with:
args: zip -qq -r ./builds/FirefoxExtensionBeta.zip ./dist
2020-02-20 17:39:06 +01:00