Skip to content

1.10.1

1.10.1 #62

Workflow file for this run

name: Master Build
on:
push:
branches:
- master
tags:
- '*'
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '14'
- uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: npm ci
- run: npm run build
- run: npm run test
- name: Archive dist code to be deployed
uses: actions/upload-artifact@v2
with:
name: dist-code
path: dist
- name: Archive source code for store uploads
uses: actions/upload-artifact@v2
with:
name: src-zip
path: dist-zip/src.zip
- name: Archive build files for store uploads
uses: actions/upload-artifact@v2
with:
name: dist-zip
path: dist-zip/dist.zip
- name: Deploy the demo to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
deploy-chrome-store:
runs-on: ubuntu-latest
needs: build
if: (github.event_name == 'create' && github.event.ref_type == 'tag') || (github.event_name == 'release' && github.event.action == 'published')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '14'
- uses: actions/download-artifact@v2
with:
name: dist-zip
path: ./dist-zip
- run: npm run deploy-chrome
env:
SOURCE_ZIP: ./dist-zip/dist.zip
EXTENSION_ID: ${{ secrets.GOOGLE_EXTENSION_ID }}
CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }}