|
59 | 59 | - name: Publish to npm |
60 | 60 | run: | |
61 | 61 | pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }} |
| 62 | +
|
| 63 | + release_vscode_extension: |
| 64 | + name: Release VS Code Extension (${{ matrix.vsce-target }}) |
| 65 | + if: github.repository == 'web-infra-dev/rstest' && github.event_name == 'workflow_dispatch' |
| 66 | + needs: release |
| 67 | + runs-on: ${{ matrix.runner }} |
| 68 | + environment: vscode-marketplace |
| 69 | + strategy: |
| 70 | + fail-fast: false |
| 71 | + matrix: |
| 72 | + include: |
| 73 | + - runner: ubuntu-latest |
| 74 | + vsce-target: linux-x64 |
| 75 | + platform: linux |
| 76 | + arch: x64 |
| 77 | + - runner: ubuntu-22.04-arm64 |
| 78 | + vsce-target: linux-arm64 |
| 79 | + platform: linux |
| 80 | + arch: arm64 |
| 81 | + - runner: macos-13 |
| 82 | + vsce-target: darwin-x64 |
| 83 | + platform: darwin |
| 84 | + arch: x64 |
| 85 | + - runner: macos-14 |
| 86 | + vsce-target: darwin-arm64 |
| 87 | + platform: darwin |
| 88 | + arch: arm64 |
| 89 | + - runner: windows-2022 |
| 90 | + vsce-target: win32-x64 |
| 91 | + platform: win32 |
| 92 | + arch: x64 |
| 93 | + - runner: windows-latest |
| 94 | + vsce-target: win32-arm64 |
| 95 | + platform: win32 |
| 96 | + arch: arm64 |
| 97 | + defaults: |
| 98 | + run: |
| 99 | + shell: bash |
| 100 | + env: |
| 101 | + npm_config_arch: ${{ matrix.arch }} |
| 102 | + npm_config_platform: ${{ matrix.platform }} |
| 103 | + VSCE_TARGET: ${{ matrix.vsce-target }} |
| 104 | + steps: |
| 105 | + - name: Checkout |
| 106 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 107 | + with: |
| 108 | + fetch-depth: 1 |
| 109 | + ref: ${{ github.event.inputs.branch }} |
| 110 | + |
| 111 | + - name: Setup Pnpm |
| 112 | + run: | |
| 113 | + npm install -g corepack@latest --force |
| 114 | + corepack enable |
| 115 | +
|
| 116 | + - name: Setup Node.js |
| 117 | + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
| 118 | + with: |
| 119 | + node-version: 22 |
| 120 | + cache: 'pnpm' |
| 121 | + |
| 122 | + - name: Install Dependencies |
| 123 | + run: pnpm install |
| 124 | + |
| 125 | + - name: Package VS Code Extension |
| 126 | + run: pnpm --filter ./packages/vscode run package:vsce -o "rstest-${{ matrix.vsce-target }}.vsix" |
| 127 | + |
| 128 | + - name: Publish VS Code Extension |
| 129 | + env: |
| 130 | + VSCE_PAT: ${{ secrets.VSCE_PAT }} |
| 131 | + run: pnpm --filter ./packages/vscode exec vsce publish --target ${{ matrix.vsce-target }} |
0 commit comments