SponsorBlock/.github/workflows/release.yml

112 lines
3.5 KiB
YAML
Raw Normal View History

2020-02-20 18:14:01 +01:00
name: Upload Release Build
on:
release:
types: [published]
2020-02-20 18:14:01 +01:00
jobs:
build:
name: Upload Release
runs-on: ubuntu-latest
steps:
2020-03-09 16:02:14 +01:00
# Initialization
2020-02-28 04:23:33 +01:00
- uses: actions/checkout@v1
2020-03-09 16:02:14 +01:00
- 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:chrome
- uses: actions/upload-artifact@v1
with:
name: ChromeExtension
path: dist
- run: mkdir ./builds
- uses: montudor/action-zip@v0.1.0
with:
args: zip -qq -r ./builds/ChromeExtension.zip ./dist/*
2020-03-09 16:02:14 +01:00
# Create Firefox artifacts
- name: Create Firefox artifacts
run: npm run build:firefox
- uses: actions/upload-artifact@v1
with:
name: FirefoxExtension
path: dist
- uses: montudor/action-zip@v0.1.0
with:
args: zip -qq -r ./builds/FirefoxExtension.zip ./dist/*
2020-03-09 16:02:14 +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
- uses: montudor/action-zip@v0.1.0
with:
args: zip -qq -r ./builds/ChromeExtensionBeta.zip ./dist/*
2020-03-09 16:02:14 +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
- uses: montudor/action-zip@v0.1.0
with:
args: zip -qq -r ./builds/FirefoxExtensionBeta.zip ./dist/*
2020-02-20 18:14:01 +01:00
2020-04-27 06:01:45 +02:00
# Create Firefox Signed Beta version
- name: Create Firefox Signed Beta artifacts
run: npm run web-sign
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
- name: Install rename
2020-04-27 20:07:09 +02:00
run: sudo apt-get install rename
2020-04-27 06:01:45 +02:00
- name: Install signed file
2020-04-27 20:07:09 +02:00
run: cd ./web-ext-artifacts
2020-05-11 05:16:35 +02:00
- run: rename 's/.*/FirefoxSignedInstaller.xpi/' *
- run: cd ..
2020-04-27 06:01:45 +02:00
- uses: actions/upload-artifact@v1
2020-04-27 20:07:09 +02:00
with:
name: FirefoxExtensionSigned.xpi
path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi
2020-04-27 06:01:45 +02:00
2020-02-20 18:14:01 +01:00
# Upload each release asset
- name: Upload to release
2020-03-09 16:15:29 +01:00
uses: Shopify/upload-to-release@master
2020-02-20 18:14:01 +01:00
with:
2020-03-09 16:15:29 +01:00
args: builds/ChromeExtension.zip
2020-03-30 20:44:26 +02:00
name: ChromeExtension.zip
2020-04-20 02:59:36 +02:00
path: ./builds/ChromeExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
2020-04-27 06:01:45 +02:00
- name: Upload to release
uses: Shopify/upload-to-release@master
with:
args: builds/ChromeExtensionBeta.zip
name: ChromeExtensionBeta.zip
path: ./builds/ChromeExtensionBeta.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
2020-02-20 18:14:01 +01:00
- name: Upload to release
2020-03-09 16:15:29 +01:00
uses: Shopify/upload-to-release@master
2020-02-20 18:14:01 +01:00
with:
2020-03-09 16:15:29 +01:00
args: builds/FirefoxExtension.zip
2020-03-30 20:44:26 +02:00
name: FirefoxExtension.zip
2020-04-20 02:59:36 +02:00
path: ./builds/FirefoxExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
2020-04-27 06:01:45 +02:00
- name: Upload to release
uses: Shopify/upload-to-release@master
with:
args: web-ext-artifacts/FirefoxSignedInstaller.xpi
name: FirefoxSignedInstaller.xpi
path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi
repo-token: ${{ secrets.GITHUB_TOKEN }}
2020-02-20 18:14:01 +01:00