|
54 | 54 | if: ${{ needs.check_changes.outputs.src_changed == 'true' || github.event_name == 'workflow_dispatch' }} |
55 | 55 | steps: |
56 | 56 | - uses: actions/checkout@v4 |
| 57 | + - name: Inject Env |
| 58 | + run: | |
| 59 | + echo "INPUT_PLATFORM=${{ github.event.inputs.platform }}" >> $GITHUB_ENV |
| 60 | + echo "INPUT_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV |
57 | 61 | - uses: pnpm/action-setup@v4 |
58 | 62 | with: |
59 | 63 | version: 9 |
|
69 | 73 | TOKEN: ${{ secrets.SNAPSHOT_TOKEN }} |
70 | 74 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
71 | 75 | run: node ./scripts/get-snapshot-version.mjs |
72 | | - - name: Build Firefox v2 |
73 | | - run: npm run build:firefox_v2 |
74 | | - - name: Build Firefox v3 |
75 | | - run: npm run build:firefox_v3 |
76 | | - - name: Build Chrome v2 |
77 | | - run: npm run build:chrome_v2 |
78 | | - - name: Build Chrome v3 |
79 | | - run: npm run build:chrome_v3 |
80 | | - - name: Upload bundle |
81 | | - uses: actions/upload-artifact@v4 |
82 | | - with: |
83 | | - name: dist |
84 | | - retention-days: 7 |
85 | | - path: | |
86 | | - dist_chrome_v2 |
87 | | - dist_chrome_v3 |
88 | | - dist_firefox_v2 |
89 | | - dist_firefox_v3 |
90 | | - - name: Install Edge |
91 | | - id: install-edge |
92 | | - run: | |
93 | | - sudo apt-get remove -y microsoft-edge-stable |
94 | | - sudo wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/microsoft.gpg |
95 | | - sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" |
96 | | - sudo apt-get update |
97 | | - sudo apt-get install -y microsoft-edge-stable=138.0.3351.109-1 |
98 | | - microsoft-edge --version |
99 | | - EDGE_PATH=$(which microsoft-edge) |
100 | | - echo "edge-path=$EDGE_PATH" >> $GITHUB_OUTPUT |
101 | | - - name: Test |
102 | | - env: |
103 | | - EDGE_PATH: ${{ steps.install-edge.outputs.edge-path }} |
104 | | - run: | |
105 | | - npx puppeteer browsers install |
106 | | - php -S 0.0.0.0:8899 -t $GITHUB_WORKSPACE/tests/simple-server > /dev/null 2>&1 & |
107 | | - sleep 2 |
108 | | - npm run test:e2e |
| 76 | + - name: Build And Test |
| 77 | + uses: ./.github/actions/build-and-test |
109 | 78 | - name: Publish snapshot |
110 | 79 | env: |
111 | 80 | AMO_KEY: ${{ secrets.AMO_KEY }} |
|
0 commit comments