|
7 | 7 | release: |
8 | 8 | types: [published] |
9 | 9 |
|
| 10 | +env: |
| 11 | + VERSION: ${{ github.event.release.tag_name }} |
| 12 | + |
10 | 13 | jobs: |
11 | | - publish: |
12 | | - runs-on: ubuntu-latest |
| 14 | + publish-firefox: |
| 15 | + runs-on: ubuntu-24.04 |
13 | 16 | steps: |
14 | 17 | - uses: actions/checkout@v4 |
| 18 | + |
15 | 19 | - uses: actions/setup-node@v4 |
16 | 20 | with: |
17 | 21 | node-version: "22" |
| 22 | + |
18 | 23 | - name: Generate source archive |
19 | 24 | run: npm run archive |
20 | | - env: |
21 | | - VERSION: ${{ github.event.release.tag_name }} |
| 25 | + |
| 26 | + - name: Upload source archive |
| 27 | + uses: actions/upload-artifact@v4 |
| 28 | + with: |
| 29 | + name: codecov-browser-extension-${{ github.event.release.tag_name }}.tar.gz |
| 30 | + path: codecov-browser-extension-${{ github.event.release.tag_name }}.tar.gz |
| 31 | + |
22 | 32 | - name: Install dependencies |
23 | 33 | run: npm ci |
24 | | - - name: Build extension |
25 | | - run: npm run build |
| 34 | + |
| 35 | + - name: Build Firefox extension |
| 36 | + run: npm run build:firefox |
26 | 37 | env: |
27 | 38 | SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
28 | | - VERSION: ${{ github.event.release.tag_name }} |
29 | | - - name: Prepare Firefox extension |
30 | | - run: | |
31 | | - cp -r dist dist-chrome |
32 | | - mv dist/manifest.firefox.json dist/manifest.json |
33 | | - npm run set-version |
34 | | - mv dist dist-firefox |
35 | | - - name: Upload built Chrome extension |
36 | | - uses: actions/upload-artifact@v4 |
37 | | - with: |
38 | | - name: codecov-chrome-${{ github.event.release.tag_name }} |
39 | | - path: ./dist-chrome/ |
| 39 | + |
40 | 40 | - name: Upload built Firefox extension |
41 | 41 | uses: actions/upload-artifact@v4 |
42 | 42 | with: |
43 | 43 | name: codecov-firefox-${{ github.event.release.tag_name }} |
44 | | - path: ./dist-firefox/ |
45 | | - - name: Upload source archive |
| 44 | + path: ./dist/ |
| 45 | + |
| 46 | + - name: Publish to Firefox |
| 47 | + working-directory: dist |
| 48 | + run: npx web-ext sign |
| 49 | + env: |
| 50 | + WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_JWT_ISSUER }} |
| 51 | + WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_JWT_SECRET }} |
| 52 | + WEB_EXT_CHANNEL: listed |
| 53 | + WEB_EXT_UPLOAD_SOURCE_CODE: ../codecov-browser-extension-${{ github.event.release.tag_name }}.tar.gz |
| 54 | + WEB_EXT_APPROVAL_TIMEOUT: 0 # Disable timeout for approval |
| 55 | + |
| 56 | + publish-chrome: |
| 57 | + runs-on: ubuntu-24.04 |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v4 |
| 60 | + |
| 61 | + - uses: actions/setup-node@v4 |
| 62 | + with: |
| 63 | + node-version: "22" |
| 64 | + |
| 65 | + - name: Install dependencies |
| 66 | + run: npm ci |
| 67 | + |
| 68 | + - name: Build Chrome extension |
| 69 | + run: npm run build |
| 70 | + env: |
| 71 | + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
| 72 | + |
| 73 | + - name: Upload built Chrome extension |
46 | 74 | uses: actions/upload-artifact@v4 |
47 | 75 | with: |
48 | | - name: codecov-browser-extension-${{ github.event.release.tag_name }}.tar.gz |
49 | | - path: codecov-browser-extension-${{ github.event.release.tag_name }}.tar.gz |
| 76 | + name: codecov-chrome-${{ github.event.release.tag_name }} |
| 77 | + path: ./dist/ |
| 78 | + |
50 | 79 | - name: Publish to Chrome |
51 | | - working-directory: dist-chrome |
| 80 | + working-directory: dist |
52 | 81 | run: npx chrome-webstore-upload-cli@3 |
53 | 82 | env: |
54 | 83 | EXTENSION_ID: "gedikamndpbemklijjkncpnolildpbgo" |
55 | 84 | CLIENT_ID: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_ID }} |
56 | 85 | CLIENT_SECRET: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_SECRET }} |
57 | 86 | REFRESH_TOKEN: ${{ secrets.GOOGLE_WEB_STORE_REFRESH_TOKEN }} |
58 | | - - name: Publish to Firefox |
59 | | - working-directory: dist-firefox |
60 | | - run: npx web-ext sign |
61 | | - env: |
62 | | - WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_JWT_ISSUER }} |
63 | | - WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_JWT_SECRET }} |
64 | | - WEB_EXT_CHANNEL: listed |
65 | | - WEB_EXT_UPLOAD_SOURCE_CODE: ../codecov-browser-extension-${{ github.event.release.tag_name }}.tar.gz |
66 | | - WEB_EXT_APPROVAL_TIMEOUT: 0 # Disable timeout for approval |
|
0 commit comments