docs: update firefox notice #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and deploy | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
update: | |
description: 'build + deploy' | |
required: true | |
default: 'Build & Deploy' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ contains(github.event.head_commit.message, 'version:') }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up node 14.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.x' | |
- name: Build distributable | |
run: | | |
npm ci | |
ls -al | |
npm run build | |
- name: Commit report | |
run: | | |
git config user.name 'Github Actions' | |
git config user.email 'joo-na@users.noreply.github.com' | |
git add -fN dist | |
git diff -- dist > git.diff | |
[ -s git.diff ] && git add -f dist && git commit -m ":rocket: deploy at `date "+%Y-%m-%d %H:%M"`" && git push || echo "Skip commit" | |
deploy: | |
needs: build | |
if: ${{ contains(github.ref, 'main') || contains(github.event.head_commit.message, '[deploy]') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- run: git pull | |
- name: Zip files | |
run: zip -r dist.zip ./dist/* | |
- name: Install CLI Tool | |
run: npm install chrome-webstore-upload-cli@2.0.1 -g | |
- name: Upload Files | |
run: | | |
cd dist && chrome-webstore-upload upload --auto-publish | |
env: | |
EXTENSION_ID: ${{ secrets.EXTENSION_ID }} | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} |