Skip to content

fix bug and refactor #8

fix bug and refactor

fix bug and refactor #8

Workflow file for this run

# NOTE: https://zenn.dev/eetann/articles/2022-07-25-crx-with-github-actions
name: Release
on:
pull_request:
types:
- closed
branches:
- master
jobs:
Release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- uses: fregante/daily-version-action@a1fc2b591c0bee1c12274b8dffaddea11c079082
name: Create tag if necessary
id: daily-version
- run: yarn
- run: yarn build
- name: Update manifest.json
run: |
npx dot-json@1 build/manifest.json version ${{ steps.daily-version.outputs.version }}
- run: node deploy.js
- name: Submit
run: |
npx chrome-webstore-upload-cli@2 upload --source extension.zip --auto-publish
env:
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
- name: Create release draft
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.daily-version.outputs.version }}
generate_release_notes: true
files: extension.zip