|
1 | | -name: Publish to all stores |
| 1 | +name: Publish Extension to All Stores |
| 2 | + |
2 | 3 | on: [workflow_dispatch] |
3 | 4 |
|
4 | 5 | jobs: |
5 | | - setup: |
6 | | - name: Setup and build |
| 6 | + build: |
7 | 7 | runs-on: ubuntu-latest |
8 | | - outputs: |
9 | | - target-zip: ${{ steps.build.outputs.target-zip }} |
10 | | - firefox-zip: ${{ steps.build.outputs.firefox-zip }} |
11 | | - source-zip: ${{ steps.build.outputs.source-zip }} |
12 | 8 | steps: |
13 | | - - uses: actions/checkout@v4 |
| 9 | + - name: Checkout repository |
| 10 | + uses: actions/checkout@v4 |
14 | 11 | with: |
15 | | - fetch-depth: 0 |
| 12 | + fetch-depth: 0 |
16 | 13 |
|
17 | | - - name: Setup NodeJS |
| 14 | + - name: Setup Node.js |
18 | 15 | uses: actions/setup-node@v4 |
19 | 16 | with: |
20 | 17 | node-version: "v20.11.0" |
21 | 18 |
|
22 | 19 | - name: Install dependencies |
23 | 20 | run: npm install |
24 | 21 |
|
25 | | - - name: Build for all platforms |
26 | | - id: build |
27 | | - run: | |
28 | | - npm run build |
29 | | - npm run build:firefox |
30 | | - echo "target-zip=market_packages/target.zip" >> $GITHUB_OUTPUT |
31 | | - echo "firefox-zip=market_packages/target.firefox.zip" >> $GITHUB_OUTPUT |
32 | | - echo "source-zip=market_packages/target.src.zip" >> $GITHUB_OUTPUT |
| 22 | + - name: Build for Chrome and Edge |
| 23 | + run: npm run build |
| 24 | + |
| 25 | + - name: Build for Firefox |
| 26 | + run: npm run build:firefox |
| 27 | + |
| 28 | + - name: Upload Chrome/Edge Artifact |
| 29 | + uses: actions/upload-artifact@v4 |
| 30 | + with: |
| 31 | + name: chrome-edge-package |
| 32 | + path: market_packages/target.zip |
| 33 | + |
| 34 | + - name: Upload Firefox XPI Artifact |
| 35 | + uses: actions/upload-artifact@v4 |
| 36 | + with: |
| 37 | + name: firefox-xpi-package |
| 38 | + path: market_packages/target.firefox.zip |
| 39 | + |
| 40 | + - name: Upload Firefox Source Artifact |
| 41 | + uses: actions/upload-artifact@v4 |
| 42 | + with: |
| 43 | + name: firefox-source-package |
| 44 | + path: market_packages/target.src.zip |
33 | 45 |
|
34 | 46 | publish-chrome: |
35 | | - name: Publish to Chrome Web Store |
36 | | - needs: setup |
| 47 | + needs: build |
37 | 48 | runs-on: ubuntu-latest |
38 | 49 | steps: |
39 | | - - uses: actions/download-artifact@v4 |
| 50 | + - name: Download Chrome/Edge Artifact |
| 51 | + uses: actions/download-artifact@v4 |
40 | 52 | with: |
41 | | - name: build-artifacts |
42 | | - path: market_packages |
| 53 | + name: chrome-edge-package |
43 | 54 |
|
44 | | - - name: Publish to Chrome Web Store |
| 55 | + - name: Upload to Chrome Web Store |
45 | 56 | uses: mnao305/chrome-extension-upload@v5.0.0 |
46 | 57 | with: |
47 | | - file-path: ${{ needs.setup.outputs.target-zip }} |
48 | | - extension-id: dkdhhcbjijekmneelocdllcldcpmekmm |
49 | | - client-id: ${{ secrets.CHROME_CLIENT_ID }} |
50 | | - client-secret: ${{ secrets.CHROME_CLIENT_SECRET }} |
51 | | - refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} |
52 | | - publish: true |
| 58 | + file-path: target.zip |
| 59 | + extension-id: dkdhhcbjijekmneelocdllcldcpmekmm |
| 60 | + client-id: ${{ secrets.CHROME_CLIENT_ID }} |
| 61 | + client-secret: ${{ secrets.CHROME_CLIENT_SECRET }} |
| 62 | + refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} |
| 63 | + publish: true |
53 | 64 |
|
54 | 65 | publish-edge: |
55 | | - name: Publish to Edge Addons |
56 | | - needs: setup |
| 66 | + needs: build |
57 | 67 | runs-on: ubuntu-latest |
58 | 68 | steps: |
59 | | - - uses: actions/download-artifact@v4 |
60 | | - with: |
61 | | - name: build-artifacts |
62 | | - path: market_packages |
63 | | - |
64 | | - - name: Publish to Edge Addons |
65 | | - uses: wdzeng/edge-addon@v2 |
66 | | - with: |
67 | | - zip-path: ${{ needs.setup.outputs.target-zip }} |
68 | | - product-id: 2a99ae83-5ec8-4ad2-aa63-9a276fc708ce |
69 | | - client-id: ${{ secrets.EDGE_CLIENT_ID }} |
70 | | - api-key: ${{ secrets.EDGE_API_KEY }} |
71 | | - upload-only: false |
| 69 | + - name: Download Chrome/Edge Artifact |
| 70 | + uses: actions/download-artifact@v4 |
| 71 | + with: |
| 72 | + name: chrome-edge-package |
| 73 | + |
| 74 | + - name: Upload to Edge Add-on Store |
| 75 | + uses: wdzeng/edge-addon@v2 |
| 76 | + with: |
| 77 | + zip-path: target.zip |
| 78 | + product-id: 2a99ae83-5ec8-4ad2-aa63-9a276fc708ce |
| 79 | + client-id: ${{ secrets.EDGE_CLIENT_ID }} |
| 80 | + api-key: ${{ secrets.EDGE_API_KEY }} |
| 81 | + upload-only: false |
72 | 82 |
|
73 | 83 | publish-firefox: |
74 | | - name: Publish to Firefox Addons |
75 | | - needs: setup |
| 84 | + needs: build |
76 | 85 | runs-on: ubuntu-latest |
77 | 86 | steps: |
78 | | - - uses: actions/download-artifact@v4 |
79 | | - with: |
80 | | - name: build-artifacts |
81 | | - path: market_packages |
82 | | - |
83 | | - - name: Publish to Firefox Addons |
84 | | - uses: wdzeng/firefox-addon@v1.2.0-alpha.0 |
85 | | - with: |
86 | | - addon-guid: "{a8cf72f7-09b7-4cd4-9aaa-7a023bf09916}" |
87 | | - xpi-path: ${{ needs.setup.outputs.firefox-zip }} |
88 | | - source-file-path: ${{ needs.setup.outputs.source-zip }} |
89 | | - compatibility: firefox, android |
90 | | - jwt-issuer: ${{ secrets.FIREFOX_JWD_ISSUER }} |
91 | | - jwt-secret: ${{ secrets.FIREFOX_JWD_SECRET }} |
| 87 | + - name: Download Firefox XPI Artifact |
| 88 | + uses: actions/download-artifact@v4 |
| 89 | + with: |
| 90 | + name: firefox-xpi-package |
| 91 | + |
| 92 | + - name: Download Firefox Source Artifact |
| 93 | + uses: actions/download-artifact@v4 |
| 94 | + with: |
| 95 | + name: firefox-source-package |
| 96 | + |
| 97 | + - name: Upload to Firefox Add-on Store |
| 98 | + uses: wdzeng/firefox-addon@v1.2.0-alpha.0 |
| 99 | + with: |
| 100 | + addon-guid: "{a8cf72f7-09b7-4cd4-9aaa-7a023bf09916}" |
| 101 | + xpi-path: target.firefox.zip |
| 102 | + source-file-path: target.src.zip |
| 103 | + compatibility: firefox, android |
| 104 | + jwt-issuer: ${{ secrets.FIREFOX_JWD_ISSUER }} |
| 105 | + jwt-secret: ${{ secrets.FIREFOX_JWD_SECRET }} |
0 commit comments