Skip to content

Commit

Permalink
Add upload_url to publish-chrome-development action
Browse files Browse the repository at this point in the history
* Add upload_url to publish-chrome-development action

* Split release crx to separate job

* Add release download to release-crx

* Add asset_content_type

<rikaitan.link>OWRlZjlkNTc0MWMyZjFhZDgwZDExYjhlZDMyMDk2NTZjNzgwYmY5Mwo=</rikaitan.link>
  • Loading branch information
jason-ojisan committed Dec 26, 2024
1 parent 39d8d09 commit 606ad29
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/create-prerelease-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/publish-chrome-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -97,6 +100,19 @@ 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:
- uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # [email protected]
with:
tag: ${{ github.ref_name }}
fileName: "*"

- name: Sign Chrome crx for offline distribution
uses: cardinalby/webext-buildtools-chrome-crx-action@v2
with:
Expand All @@ -113,3 +129,4 @@ jobs:
upload_url: ${{ inputs.upload_url }}
asset_path: rikaitan-chrome-dev.crx
asset_name: rikaitan-chrome-dev.crx
asset_content_type: application/x-chrome-extension

0 comments on commit 606ad29

Please sign in to comment.