From ee9da954e90b0c21ae8a7c800e654470252bd777 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Wed, 25 Dec 2024 12:16:39 -0500 Subject: [PATCH 1/4] Add upload_url to publish-chrome-development action --- .github/workflows/create-prerelease-on-tag.yml | 1 + .github/workflows/publish-chrome-development.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/create-prerelease-on-tag.yml b/.github/workflows/create-prerelease-on-tag.yml index 369750f03..0545f1806 100644 --- a/.github/workflows/create-prerelease-on-tag.yml +++ b/.github/workflows/create-prerelease-on-tag.yml @@ -52,6 +52,7 @@ jobs: workflow: publish-chrome-development token: ${{ secrets.GITHUB_TOKEN }} wait-for-completion: false + inputs: '{ "upload_url": "${{ steps.release.outputs.upload_url }}" }' - name: Dispatch publish-firefox-development uses: aurelien-baudet/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7 # pin@v2 diff --git a/.github/workflows/publish-chrome-development.yml b/.github/workflows/publish-chrome-development.yml index 73d498140..8c3d91518 100644 --- a/.github/workflows/publish-chrome-development.yml +++ b/.github/workflows/publish-chrome-development.yml @@ -10,6 +10,9 @@ on: description: "Max attempts" required: false default: "10" + upload_url: + description: "The upload_url from the release created by create-prerelease-on-tag.yml" + required: true permissions: contents: read jobs: From 8b254760c2b01a3d047c89c3f5076c15fa908ca4 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Wed, 25 Dec 2024 12:58:50 -0500 Subject: [PATCH 2/4] Split release crx to separate job --- .github/workflows/publish-chrome-development.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/publish-chrome-development.yml b/.github/workflows/publish-chrome-development.yml index 8c3d91518..00fcdda35 100644 --- a/.github/workflows/publish-chrome-development.yml +++ b/.github/workflows/publish-chrome-development.yml @@ -100,6 +100,14 @@ jobs: extensionId: ${{ secrets.G_DEVELOPMENT_EXTENSION_ID }} apiAccessToken: ${{ steps.fetchAccessToken.outputs.accessToken }} + release-crx: + runs-on: ubuntu-latest + environment: cd + permissions: + actions: write + contents: write + + steps: - name: Sign Chrome crx for offline distribution uses: cardinalby/webext-buildtools-chrome-crx-action@v2 with: From 54f1712a94527532220f24bc5d51dd7ea2df479f Mon Sep 17 00:00:00 2001 From: kuuuube Date: Wed, 25 Dec 2024 13:01:11 -0500 Subject: [PATCH 3/4] Add release download to release-crx --- .github/workflows/publish-chrome-development.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish-chrome-development.yml b/.github/workflows/publish-chrome-development.yml index 00fcdda35..148054ea4 100644 --- a/.github/workflows/publish-chrome-development.yml +++ b/.github/workflows/publish-chrome-development.yml @@ -108,6 +108,11 @@ jobs: contents: write steps: + - uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # pin@v1.11 + with: + tag: ${{ github.ref_name }} + fileName: "*" + - name: Sign Chrome crx for offline distribution uses: cardinalby/webext-buildtools-chrome-crx-action@v2 with: From f51858dc1653ab7cb846a0588b71e9c6f62d789d Mon Sep 17 00:00:00 2001 From: kuuuube Date: Wed, 25 Dec 2024 13:11:44 -0500 Subject: [PATCH 4/4] Add asset_content_type --- .github/workflows/publish-chrome-development.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-chrome-development.yml b/.github/workflows/publish-chrome-development.yml index 148054ea4..a3578ec07 100644 --- a/.github/workflows/publish-chrome-development.yml +++ b/.github/workflows/publish-chrome-development.yml @@ -129,3 +129,4 @@ jobs: upload_url: ${{ inputs.upload_url }} asset_path: yomitan-chrome-dev.crx asset_name: yomitan-chrome-dev.crx + asset_content_type: application/x-chrome-extension