-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): upload extensions to stores
- Loading branch information
1 parent
4deaf42
commit fac9f19
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Upload to Chrome Web Store | ||
description: Upload extension zip from dist/ directory to Chrome Web Store | ||
|
||
inputs: | ||
CHROME_EXT_ID: | ||
description: Chrome Web Store extension ID | ||
required: true | ||
CHROME_CLIENT_ID: | ||
description: Client ID for Chrome Web Store | ||
required: true | ||
CHROME_CLIENT_SECRET: | ||
description: Client secret for Chrome Web Store | ||
required: true | ||
CHROME_REFRESH_TOKEN: | ||
description: Refresh token for Chrome Web Store | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: { node-version-file: .nvmrc } | ||
|
||
- name: Get extension path | ||
id: path | ||
shell: bash | ||
run: | | ||
CHROME_ZIP=$(find dist -type f -name "*chrome*.zip") | ||
echo "CHROME_ZIP=$CHROME_ZIP" >> $GITHUB_OUTPUT | ||
- name: Upload to Chrome Web Store | ||
run: npx chrome-webstore-upload-cli@3 upload --source ${{ steps.path.outputs.chrome }} | ||
shell: bash | ||
env: | ||
EXTENSION_ID: ${{ inputs.CHROME_EXT_ID }} | ||
CLIENT_ID: ${{ inputs.CHROME_CLIENT_ID }} | ||
CLIENT_SECRET: ${{ inputs.CHROME_CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ inputs.CHROME_REFRESH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Upload to Firefox Addons | ||
description: Upload extension zip from dist/ directory to Firefox Addons | ||
|
||
inputs: | ||
FIREFOX_API_KEY: | ||
description: API key for Firefox Addons | ||
required: true | ||
FIREFOX_API_SECRET: | ||
description: API secret for Firefox Addons | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: { node-version-file: .nvmrc } | ||
|
||
- name: Get extension path | ||
id: path | ||
shell: bash | ||
run: | | ||
FIREFOX_ZIP=$(find dist -type f -name "*firefox*.zip") | ||
echo "FIREFOX_ZIP=$FIREFOX_ZIP" >> $GITHUB_OUTPUT | ||
- name: Get source code | ||
shell: bash | ||
run: git archive --output source.zip HEAD | ||
|
||
# TODO: figure out how to specify build zip file | ||
- name: Upload to Firefox Addons | ||
run: npx web-ext@8 sign --channel listed --upload-source-code ./source.zip | ||
shell: bash | ||
working-directory: artifact | ||
env: | ||
WEB_EXT_API_KEY: ${{ inputs.FIREFOX_API_KEY }} | ||
WEB_EXT_API_SECRET: ${{ inputs.FIREFOX_API_SECRET }} |