Skip to content

kuba65 Building and deploying to Google extension store πŸš€ #21

kuba65 Building and deploying to Google extension store πŸš€

kuba65 Building and deploying to Google extension store πŸš€ #21

Workflow file for this run

name: Build and deploy to google
run-name: ${{ github.actor }} Building and deploying to Google extension store πŸš€
on:
push:
branches:
- main
jobs:
build-chrome-extension:
name: Build Chrome extension artifact
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v2-beta
with:
node-version: "18.10"
- name: Build
run: |-
# fill in your build steps here...
# we archive the dist folder and include SHA commit as the last step
zip -r chrome-extension-${{ github.event.pull_request.head.sha }}.zip .
- name: Archive chrome-extension artifact
uses: actions/upload-artifact@v4
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
steps:
- uses: actions/setup-node@v2-beta
with:
node-version: "18.10"
- name: Download bundle artifact
uses: actions/download-artifact@v4
with:
name: chrome-extension-${{ github.sha }}
- name: Install webstore cli
run: |-
npm install -g chrome-webstore-upload-cli
- name: Upload step
run: |-
chrome-webstore-upload upload \
--source chrome-extension-${{ github.event.pull_request.head.sha }}.zip \
--extension-id ${{ secrets.EXTENSION_ID }} \
--client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} \
--client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} \
--refresh-token ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }}