Skip to content

release v3.1.2

release v3.1.2 #12

name: Update Chrome Store
on:
push:
tags:
- v*
jobs:
build-chrome-extension:
name: Build Chrome extension artifact
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out
uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Installing dependencies
run: bun install
- name: Build for production
run: bun run build
- name: Compress build folder
run: zip -r chrome-extension-${{ github.event.pull_request.head.sha }}.zip build
- name: Archive chrome-extension artifact
uses: actions/upload-artifact@v3
with:
name: chrome-extension-${{ github.sha }}
path: chrome-extension-${{ github.event.pull_request.head.sha }}.zip
upload-extension:
name: Upload extension
runs-on: ubuntu-latest
needs: build-chrome-extension
env:
EXTENSION_ID: jcoanhnlcggnjkefelkngdpongoaipdk
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Download bundle artifact
uses: actions/download-artifact@v3
with:
name: chrome-extension-${{ github.sha }}
- name: Install webstore cli
run: npm install -g chrome-webstore-upload-cli
- name: Upload to Store
run: chrome-webstore-upload upload --source chrome-extension-${{ github.event.pull_request.head.sha }}.zip --extension-id ${{ env.EXTENSION_ID }} --client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} --client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} --refresh-token ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }}
- name: Publish to Store
run: chrome-webstore-upload publish --extension-id ${{ env.EXTENSION_ID }} --client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} --client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} --refresh-token ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }}