Web发布 #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Web发布 | |
| concurrency: | |
| group: web-release | |
| cancel-in-progress: true | |
| on: workflow_dispatch | |
| permissions: | |
| contents: read | |
| jobs: | |
| app-test: | |
| name: 应用测试 | |
| environment: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/initialize-project | |
| - name: 应用测试 | |
| run: | | |
| bun run build | |
| bun run test | |
| - name: 上传测试结果 | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: playwright-report | |
| path: playwright-report | |
| build-release: | |
| name: 构建并发布 | |
| needs: app-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/initialize-project | |
| - name: 构建 | |
| run: bun run build | |
| - name: 发布 | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| wranglerVersion: latest | |
| packageManager: bun | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |