Skip to content

fix more require

fix more require #16

Workflow file for this run

name: deploy
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_VERSION: "14"
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
id: cache
with:
path: ./node_modules
key: node-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
if: steps.cache.outputs.cache-hit != 'true'
- run: npm run build
- uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist/temp/firefox
dist/m1pro.prod.user.js
dist/m1pro*.zip
deploy:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
command:
- firefox
- chrome
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: dist
- name: submit
run: |
case ${{ matrix.command }} in
chrome)
npx chrome-webstore-upload-cli@next upload --auto-publish --source m1pro-chrome.zip --extension-id agapnbihododcdnknlbogoajfajllgjd
;;
firefox)
npx web-ext-submit@5 --source-dir temp/firefox
;;
esac
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}