Add dist files #2
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: Manual VSCE Publish | |
| on: | |
| push: | |
| branches: | |
| - replace-prettier-by-oxfmt | |
| workflow_dispatch: | |
| inputs: | |
| prerelease: | |
| description: Publish as pre-release | |
| required: true | |
| default: true | |
| type: boolean | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: manual-vsce-publish | |
| cancel-in-progress: false | |
| jobs: | |
| publish: | |
| name: Publish ${{ matrix.platform }}-${{ matrix.arch }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| platform: win32 | |
| arch: x64 | |
| npm_config_arch: x64 | |
| - os: windows-latest | |
| platform: win32 | |
| arch: arm64 | |
| npm_config_arch: arm64 | |
| - os: ubuntu-latest | |
| platform: linux | |
| arch: x64 | |
| npm_config_arch: x64 | |
| - os: ubuntu-latest | |
| platform: linux | |
| arch: arm64 | |
| npm_config_arch: arm64 | |
| - os: ubuntu-latest | |
| platform: linux | |
| arch: armhf | |
| npm_config_arch: arm | |
| - os: ubuntu-latest | |
| platform: alpine | |
| arch: x64 | |
| npm_config_arch: x64 | |
| npm_config_platform: linux | |
| npm_config_libc: musl | |
| - os: ubuntu-latest | |
| platform: alpine | |
| arch: arm64 | |
| npm_config_arch: arm64 | |
| npm_config_platform: linux | |
| npm_config_libc: musl | |
| - os: macos-latest | |
| platform: darwin | |
| arch: x64 | |
| npm_config_arch: x64 | |
| - os: macos-latest | |
| platform: darwin | |
| arch: arm64 | |
| npm_config_arch: arm64 | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| npm_config_arch: ${{ matrix.npm_config_arch }} | |
| npm_config_platform: ${{ matrix.npm_config_platform || matrix.platform }} | |
| npm_config_libc: ${{ matrix.npm_config_libc }} | |
| VSCE_TARGET: ${{ matrix.platform }}-${{ matrix.arch }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install VSCE CLI | |
| run: npm install -g @vscode/vsce | |
| - name: Package extension | |
| working-directory: apps/vscode-extension | |
| shell: bash | |
| run: | | |
| vsce package --target "$VSCE_TARGET" | |
| package_path=$(ls -1 *-$VSCE_TARGET-*.vsix | head -n 1) | |
| if [[ -z "$package_path" ]]; then | |
| echo "Could not find packaged VSIX for target $VSCE_TARGET" | |
| exit 1 | |
| fi | |
| echo "PACKAGE_PATH=$package_path" >> "$GITHUB_ENV" | |
| - name: Upload VSIX artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.VSCE_TARGET }} | |
| path: apps/vscode-extension/${{ env.PACKAGE_PATH }} | |
| - name: Publish extension | |
| if: github.event_name == 'workflow_dispatch' && inputs.prerelease == false | |
| working-directory: apps/vscode-extension | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| run: vsce publish --packagePath "${{ env.PACKAGE_PATH }}" | |
| - name: Publish pre-release extension | |
| if: github.event_name == 'workflow_dispatch' && inputs.prerelease == true | |
| working-directory: apps/vscode-extension | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| run: vsce publish --packagePath "${{ env.PACKAGE_PATH }}" --pre-release |