84 lines
2.5 KiB
YAML
84 lines
2.5 KiB
YAML
# This workflow will generate all artifacts required for a Release,
|
|
# which can be downloaded from GitHub and then uploaded to the various
|
|
# browser "extension stores"
|
|
# See: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release
|
|
|
|
name: Upload Release Artifacts
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
name: Upload release
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# Initialization
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
- run: npm ci
|
|
|
|
# Create Chrome artifacts
|
|
- name: Create Chrome artifacts
|
|
run: npm run build:chrome
|
|
env:
|
|
GA_API_TOKEN: ${{ secrets.GA_API_TOKEN }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ChromeExtension
|
|
path: dist
|
|
- run: mkdir ./builds
|
|
- name: Zip Artifacts
|
|
run: cd ./dist && zip -r ../builds/ChromeExtension.zip *
|
|
|
|
# Create Edge artifacts
|
|
- name: Create Edge artifacts
|
|
run: npm run build:edge
|
|
env:
|
|
GA_API_TOKEN: ${{ secrets.GA_API_TOKEN }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: EdgeExtension
|
|
path: dist
|
|
- name: Zip Artifacts
|
|
run: cd ./dist && zip -r ../builds/EdgeExtension.zip *
|
|
|
|
# Create Firefox artifacts
|
|
- name: Create Firefox artifacts
|
|
run: npm run build:firefox
|
|
env:
|
|
GA_API_TOKEN: ${{ secrets.GA_API_TOKEN }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: FFExtension
|
|
path: dist
|
|
- name: Zip Artifacts
|
|
run: cd ./dist && zip -r ../builds/FFExtension.zip *
|
|
|
|
# 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 EdgeExtension to release
|
|
uses: Shopify/upload-to-release@master
|
|
with:
|
|
args: builds/EdgeExtension.zip
|
|
name: EdgeExtension.zip
|
|
path: ./builds/EdgeExtension.zip
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Upload FFExtension to release
|
|
uses: Shopify/upload-to-release@master
|
|
with:
|
|
args: builds/FFExtension.zip
|
|
name: FFExtension.zip
|
|
path: ./builds/FFExtension.zip
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|