Skip to content

Commit

Permalink
Add publish to Chrome store action
Browse files Browse the repository at this point in the history
  • Loading branch information
gmertes committed Apr 30, 2024
1 parent 89d303e commit 17731f3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build.yaml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and publish

on:
push:
tags:
- 'v*'

jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Pack
run: npm run pack

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: archives
path: dist/*.zip

- name: Get zip path
run: echo "ZIP_CHROME=dist/$(ls dist | grep chrome)" >> $GITHUB_ENV

- name: Upload to Chrome Web Store
uses: mobilefirstllc/cws-publish@latest
with:
action: 'upload'
client_id: ${{ secrets.CHROME_ID }}
client_secret: ${{ secrets.CHROME_SECRET }}
refresh_token: ${{ secrets.CHROME_REFRESH_TOKEN }}
extension_id: 'nhjapojbdgmjlnmlenegefgfjannjchb'
zip_file: ${{ env.ZIP_CHROME }}

0 comments on commit 17731f3

Please sign in to comment.