From 4a5399656b09fce5d1040a3a43f5cddb651c2034 Mon Sep 17 00:00:00 2001 From: Bims Date: Wed, 4 Sep 2024 18:48:43 +0200 Subject: [PATCH] Add workflow for publishing to chrome web store --- .../workflows/build_and_publish_chrome.yml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build_and_publish_chrome.yml diff --git a/.github/workflows/build_and_publish_chrome.yml b/.github/workflows/build_and_publish_chrome.yml new file mode 100644 index 0000000..716c457 --- /dev/null +++ b/.github/workflows/build_and_publish_chrome.yml @@ -0,0 +1,34 @@ +name: Publish + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: Install dependencies + run: npm install + + - name: Build the extension + run: npm run build:chrome + + - name: Put the extension into a zip file + run: zip -r release.zip dist/chrome + + - name: Upload to Chrome Web Store + uses: mobilefirstllc/cws-publish@latest + with: + action: 'upload' + client_id: ${{ secrets.CLIENT }} + client_secret: ${{ secrets.SECRET }} + refresh_token: ${{ secrets.TOKEN }} + extension_id: ${{ secrets.EXTENSION_ID }} + zip_file: 'release.zip'