2020-02-20 18:14:01 +01:00
|
|
|
name: Upload Release Build
|
|
|
|
|
2020-03-09 23:30:57 +01:00
|
|
|
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
|
2021-09-20 08:13:41 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
2021-10-02 23:42:47 +02:00
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
- run: npm ci
|
2020-03-09 16:02:14 +01:00
|
|
|
- name: Copy configuration
|
|
|
|
run: cp config.json.example config.json
|
2020-05-16 02:51:24 +02:00
|
|
|
|
2020-03-09 16:02:14 +01:00
|
|
|
# Create Chrome artifacts
|
|
|
|
- name: Create Chrome artifacts
|
|
|
|
run: npm run build:chrome
|
2021-09-20 08:13:41 +02:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-03-09 16:02:14 +01:00
|
|
|
with:
|
|
|
|
name: ChromeExtension
|
|
|
|
path: dist
|
|
|
|
- run: mkdir ./builds
|
2020-05-12 03:13:19 +02:00
|
|
|
- name: Zip Artifacts
|
2020-05-16 03:08:52 +02:00
|
|
|
run: cd ./dist ; zip -r ../builds/ChromeExtension.zip *
|
2020-03-09 16:02:14 +01:00
|
|
|
|
|
|
|
# Create Firefox artifacts
|
|
|
|
- name: Create Firefox artifacts
|
|
|
|
run: npm run build:firefox
|
2021-09-20 08:13:41 +02:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-03-09 16:02:14 +01:00
|
|
|
with:
|
|
|
|
name: FirefoxExtension
|
|
|
|
path: dist
|
2020-05-12 03:13:19 +02:00
|
|
|
- name: Zip Artifacts
|
2020-05-16 03:08:52 +02:00
|
|
|
run: cd ./dist ; zip -r ../builds/FirefoxExtension.zip *
|
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
|
2021-09-20 08:13:41 +02:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-03-09 16:02:14 +01:00
|
|
|
with:
|
|
|
|
name: ChromeExtensionBeta
|
|
|
|
path: dist
|
2020-05-12 03:13:19 +02:00
|
|
|
- name: Zip Artifacts
|
2020-05-16 03:08:52 +02:00
|
|
|
run: cd ./dist ; zip -r ../builds/ChromeExtensionBeta.zip *
|
2020-03-09 16:02:14 +01:00
|
|
|
|
2020-05-17 06:23:44 +02:00
|
|
|
# Upload each release asset
|
|
|
|
- name: Upload ChromeExtension to release
|
|
|
|
uses: Shopify/upload-to-release@master
|
|
|
|
with:
|
|
|
|
args: builds/ChromeExtension.zip
|
|
|
|
name: ChromeExtension.zip
|
|
|
|
path: ./builds/ChromeExtension.zip
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload ChromeExtensionBeta 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 }}
|
|
|
|
- name: Upload FirefoxExtension to release
|
|
|
|
uses: Shopify/upload-to-release@master
|
|
|
|
with:
|
|
|
|
args: builds/FirefoxExtension.zip
|
|
|
|
name: FirefoxExtension.zip
|
|
|
|
path: ./builds/FirefoxExtension.zip
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
# Firefox Beta
|
2020-03-09 16:02:14 +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-03-09 16:02:14 +01:00
|
|
|
with:
|
|
|
|
name: FirefoxExtensionBeta
|
|
|
|
path: dist
|
2020-05-12 03:13:19 +02:00
|
|
|
- name: Zip Artifacts
|
2020-05-16 03:08:52 +02:00
|
|
|
run: cd ./dist ; zip -r ../builds/FirefoxExtensionBeta.zip *
|
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-05-17 06:23:44 +02:00
|
|
|
- name: Rename signed file
|
2020-05-16 03:08:52 +02:00
|
|
|
run: cd ./web-ext-artifacts ; rename 's/.*/FirefoxSignedInstaller.xpi/' *
|
2021-09-20 08:13:41 +02:00
|
|
|
- uses: actions/upload-artifact@v2
|
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-05-17 06:23:44 +02:00
|
|
|
- name: Upload FirefoxSignedInstaller.xpi to release
|
2020-04-27 06:01:45 +02:00
|
|
|
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
|
|
|
|