From d87da2a522940688a0037b15c79965be71723796 Mon Sep 17 00:00:00 2001 From: David Fournier Date: Sat, 15 Jun 2024 12:38:59 +0200 Subject: [PATCH] Fix the release process --- .github/workflows/release.yml | 35 ++++++++++++++++++++++++++--------- package.json | 2 +- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db38386..2ad05a8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,8 +29,10 @@ jobs: id: cache-extention uses: actions/cache@v4 with: - path: public/web-ext-artifacts - key: extension-${{ github.run_id }} + path: | + web-ext-artifacts + public + key: release-${{ github.run_id }} publish-firefox: name: Publish Firefox @@ -55,10 +57,16 @@ jobs: id: cache-extention uses: actions/cache@v4 with: - path: public/build - key: extension-${{ github.run_id }} + path: | + web-ext-artifacts + public + key: release-${{ github.run_id }} - name: Publish + env: + EXTENSION_ID: ${{ secrets.EXTENSION_ID }} + WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} + WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }} run: yarn web-ext-submit publish-chrome: @@ -84,11 +92,18 @@ jobs: id: cache-extention uses: actions/cache@v4 with: - path: public/build - key: extension-${{ github.run_id }} + path: | + web-ext-artifacts + public + key: release-${{ github.run_id }} - name: Publish - run: yarn chrome-webstore-upload upload --source "web-ext-artifacts/conventional_comments-${GITHUB_REF:1}.zip" --auto-publish + env: + CLIENT_ID: ${{ secrets.CLIENT_ID }} + CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} + EXTENSION_ID: ${{ secrets.EXTENSION_ID }} + REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} + run: yarn chrome-webstore-upload upload --source "web-ext-artifacts/conventional_comments-${GITHUB_REF#refs/tags/v}.zip" --auto-publish create-release: name: Create Release @@ -105,8 +120,10 @@ jobs: id: cache-extention uses: actions/cache@v4 with: - path: public/build - key: extension-${{ github.run_id }} + path: | + web-ext-artifacts + public + key: release-${{ github.run_id }} - name: Create release uses: ncipollo/release-action@v1 diff --git a/package.json b/package.json index 6ac3b56..4ce9dbc 100755 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "lint:svelte": "svelte-check --fail-on-warnings --fail-on-hints", "test": "jest", "version": "node scripts/newVersion.js && git add public/manifest.json", - "postversion": "git push origin master && git push origin refs/tags/v$npm_package_version", + "postversion": "git push origin main && git push origin refs/tags/v$npm_package_version", "2fa-code": "node scripts/getTwoFactorAuthenticationCode.mjs", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook",