Skip to content

Commit a4c0e1e

Browse files
authored
Split Submit Workflows (#315)
* split submit workflows * chore: EOF new line
1 parent bc861c0 commit a4c0e1e

File tree

2 files changed

+42
-15
lines changed

2 files changed

+42
-15
lines changed

.github/workflows/submit_chrome.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Submit to Chrome Web Store"
2+
on:
3+
workflow_run:
4+
workflows: ["Extension Release"]
5+
types:
6+
- completed
7+
8+
jobs:
9+
submit:
10+
runs-on: "ubuntu-latest"
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Download Release Assets
16+
uses: robinraju/release-downloader@v1
17+
with:
18+
latest: true # Download the latest release
19+
out-file-path: "assets" # Output directory for downloaded assets
20+
fileName: '*' # Download all assets
21+
22+
- name: Find Extension Path
23+
id: find-path
24+
# Find and output the path to the extension zip
25+
# Required as the release action does not support glob patterns
26+
run: |
27+
CHROME_EXT_PATH=$(find assets -name "extension-*-chrome.zip" | head -n 1)
28+
echo "chrome_extension_path=$CHROME_EXT_PATH" >> $GITHUB_OUTPUT
29+
30+
- name: Chrome Web Store Publish
31+
uses: browser-actions/[email protected]
32+
with:
33+
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
34+
extension-path: ${{ steps.find-path.outputs.chrome_extension_path }}
35+
oauth-client-id: ${{ secrets.OAUTH_CLIENT_ID }}
36+
oauth-client-secret: ${{ secrets.OAUTH_CLIENT_SECRET }}
37+
oauth-refresh-token: ${{ secrets.OAUTH_REFRESH_TOKEN }}
38+

.github/workflows/submit.yml renamed to .github/workflows/submit_firefox.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Submit to Web Stores"
1+
name: "Submit to Firefox Add-ons Store"
22
on:
33
workflow_run:
44
workflows: ["Extension Release"]
@@ -23,25 +23,14 @@ jobs:
2323
out-file-path: "assets" # Output directory for downloaded assets
2424
fileName: '*' # Download all assets
2525

26-
- name: Find Extension Paths
26+
- name: Find Extension Path
2727
id: find-path
28-
# Find and output the paths to the Chrome and Firefox extension files
29-
# Required as the release actions do not support glob patterns
28+
# Find and output the path to the extension zip
29+
# Required as the release action does not support glob patterns
3030
run: |
31-
CHROME_EXT_PATH=$(find assets -name "extension-*-chrome.zip" | head -n 1)
3231
FIREFOX_EXT_PATH=$(find assets -name "extension-*-firefox.zip" | head -n 1)
33-
echo "chrome_extension_path=$CHROME_EXT_PATH" >> $GITHUB_OUTPUT
3432
echo "firefox_extension_path=$FIREFOX_EXT_PATH" >> $GITHUB_OUTPUT
3533
36-
- name: Chrome Web Store Publish
37-
uses: browser-actions/[email protected]
38-
with:
39-
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
40-
extension-path: ${{ steps.find-path.outputs.chrome_extension_path }}
41-
oauth-client-id: ${{ secrets.OAUTH_CLIENT_ID }}
42-
oauth-client-secret: ${{ secrets.OAUTH_CLIENT_SECRET }}
43-
oauth-refresh-token: ${{ secrets.OAUTH_REFRESH_TOKEN }}
44-
4534
- name: Firefox Web Store Publish
4635
uses: browser-actions/[email protected]
4736
with:

0 commit comments

Comments
 (0)