Skip to content

Commit 46f2d42

Browse files
committed
ci: publish MV2 for Edge
1 parent 786309f commit 46f2d42

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ jobs:
5858
echo "version=$VERSION" >> $GITHUB_OUTPUT
5959
echo "tag_name=$VERSION" >> $GITHUB_OUTPUT
6060
echo "ext_path_zip=dist/webscrapbook.zip" >> $GITHUB_OUTPUT
61+
echo "ext_path_zip2=dist/webscrapbook2.zip" >> $GITHUB_OUTPUT
6162
echo "ext_path_xpi=dist/webscrapbook.xpi" >> $GITHUB_OUTPUT
6263
echo "artifact_dir=dist" >> $GITHUB_OUTPUT
6364
echo "artifact_zip=webscrapbook-zip" >> $GITHUB_OUTPUT
65+
echo "artifact_zip2=webscrapbook-zip2" >> $GITHUB_OUTPUT
6466
echo "artifact_xpi=webscrapbook-xpi" >> $GITHUB_OUTPUT
6567
6668
- name: Set extension name suffix
@@ -92,6 +94,11 @@ jobs:
9294
- name: Verify no code issue
9395
run: npm run lint
9496

97+
- name: Build MV2 extension for Edge
98+
run: |
99+
npm run pack:chromium2
100+
mv ${{ steps.config.outputs.ext_path_zip }} ${{ steps.config.outputs.ext_path_zip2 }}
101+
95102
- name: Build extension
96103
run: npm run pack
97104

@@ -107,6 +114,12 @@ jobs:
107114
name: ${{ steps.config.outputs.artifact_zip }}
108115
path: ${{ steps.config.outputs.ext_path_zip }}
109116

117+
- name: Upload artifact (ZIP2)
118+
uses: actions/upload-artifact@v4
119+
with:
120+
name: ${{ steps.config.outputs.artifact_zip2 }}
121+
path: ${{ steps.config.outputs.ext_path_zip2 }}
122+
110123
- name: Upload artifact (XPI)
111124
uses: actions/upload-artifact@v4
112125
with:
@@ -145,13 +158,13 @@ jobs:
145158
- name: Download artifact
146159
uses: actions/download-artifact@v4
147160
with:
148-
name: ${{ needs.main.outputs.artifact_zip }}
161+
name: ${{ needs.main.outputs.artifact_zip2 }}
149162
path: ${{ needs.main.outputs.artifact_dir }}
150163

151164
- name: Upload to Microsoft Edge Add-ons
152165
uses: wdzeng/edge-addon@v2
153166
with:
154-
zip-path: ${{ needs.main.outputs.ext_path_zip }}
167+
zip-path: ${{ needs.main.outputs.ext_path_zip2 }}
155168
product-id: ${{ vars.EDGE_PRODUCT_ID }}
156169
client-id: ${{ secrets.EDGE_CLIENT_ID }}
157170
api-key: ${{ secrets.EDGE_API_KEY }}

0 commit comments

Comments
 (0)