From baec18a06310e0a84e4a8b12f6acfbacd8c4be08 Mon Sep 17 00:00:00 2001 From: Yevhenii Hyzyla Date: Sun, 15 Oct 2023 11:36:07 +0200 Subject: [PATCH] =?UTF-8?q?Try=20to=20fix=20build=20=E2=99=BB=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/submit.yml | 42 +++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml index a4ca111..a6cd408 100644 --- a/.github/workflows/submit.yml +++ b/.github/workflows/submit.yml @@ -1,33 +1,51 @@ name: "Submit to Web Store" on: - workflow_dispatch: + push: + tags: + - 'v*' jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Cache npm modules - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - name: Use Node.js 16.x uses: actions/setup-node@v3.4.1 with: node-version: 16.x - cache: "npm" + - name: Cache npm modules + uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + # If cache not found, use latest cache instead of having a cache miss + restore-keys: | + ${{ runner.os }}-npm- - name: Install dependencies run: npm ci + + publish-chrome: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - name: Package Chrome extension into a zip artifact run: npm run build:chrome + - name: Chrome Platform Publish + uses: PlasmoHQ/bpp@v3 + with: + keys: ${{ secrets.BPP_CHROME_KEYS }} + chrome-file: build/chrome-mv3-prod.zip + + publish-firefox: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - name: Package Firefox extension into a zip artifact run: npm run build:firefox - - name: Browser Platform Publish + - name: Firefox Platform Publish uses: PlasmoHQ/bpp@v3 with: - keys: ${{ secrets.BPP_KEYS }} - chrome-file: build/chrome-mv3-prod.zip + keys: ${{ secrets.BPP_FIREFOX_KEYS }} firefox-file: build/firefox-mv2-prod.zip