|
7 | 7 | release: |
8 | 8 | types: [published] |
9 | 9 |
|
| 10 | +env: |
| 11 | + VERSION: ${{ github.event.release.tag_name }} |
| 12 | + |
10 | 13 | jobs: |
11 | 14 | publish: |
12 | 15 | runs-on: ubuntu-latest |
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 | | - run: npm ci |
24 | | - - name: Build extension |
| 33 | + run: npm install |
| 34 | + |
| 35 | + - name: Build Chrome extension |
25 | 36 | run: npm run build |
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 |
| 39 | + |
35 | 40 | - name: Upload built Chrome extension |
36 | 41 | uses: actions/upload-artifact@v4 |
37 | 42 | with: |
38 | 43 | name: codecov-chrome-${{ github.event.release.tag_name }} |
39 | | - path: ./dist-chrome/ |
40 | | - - name: Upload built Firefox extension |
41 | | - uses: actions/upload-artifact@v4 |
42 | | - with: |
43 | | - name: codecov-firefox-${{ github.event.release.tag_name }} |
44 | | - path: ./dist-firefox/ |
45 | | - - name: Upload source archive |
46 | | - uses: actions/upload-artifact@v4 |
47 | | - 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 |
| 44 | + path: ./dist/ |
| 45 | + |
50 | 46 | - name: Publish to Chrome |
51 | | - working-directory: dist-chrome |
| 47 | + working-directory: dist |
52 | 48 | run: npx chrome-webstore-upload-cli@3 |
53 | 49 | env: |
54 | 50 | EXTENSION_ID: "gedikamndpbemklijjkncpnolildpbgo" |
55 | 51 | CLIENT_ID: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_ID }} |
56 | 52 | CLIENT_SECRET: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_SECRET }} |
57 | 53 | REFRESH_TOKEN: ${{ secrets.GOOGLE_WEB_STORE_REFRESH_TOKEN }} |
| 54 | + |
| 55 | + - name: Clean dist |
| 56 | + run: rm -r dist |
| 57 | + |
| 58 | + - name: Build Firefox extension |
| 59 | + run: npm run build:firefox |
| 60 | + env: |
| 61 | + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
| 62 | + |
| 63 | + - name: Upload built Firefox extension |
| 64 | + uses: actions/upload-artifact@v4 |
| 65 | + with: |
| 66 | + name: codecov-firefox-${{ github.event.release.tag_name }} |
| 67 | + path: ./dist/ |
| 68 | + |
58 | 69 | - name: Publish to Firefox |
59 | | - working-directory: dist-firefox |
| 70 | + working-directory: dist |
60 | 71 | run: npx web-ext sign |
61 | 72 | env: |
62 | 73 | WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_JWT_ISSUER }} |
|
0 commit comments