feat: now know as→now known as (#3609) #1970
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: VS Code Plugin | |
| on: | |
| push: | |
| branches: ["master"] | |
| tags: ["v*"] | |
| merge_group: | |
| jobs: | |
| vscode-plugin: | |
| name: ${{ matrix.platform.code_target }} | |
| if: github.event.pull_request.draft == false | |
| strategy: | |
| matrix: | |
| platform: | |
| - os: windows-latest | |
| rust_target: x86_64-pc-windows-msvc | |
| code_target: win32-x64 | |
| - os: windows-latest | |
| rust_target: aarch64-pc-windows-msvc | |
| code_target: win32-arm64 | |
| - os: macOS-latest | |
| rust_target: x86_64-apple-darwin | |
| code_target: darwin-x64 | |
| - os: macOS-latest | |
| rust_target: aarch64-apple-darwin | |
| code_target: darwin-arm64 | |
| - os: ubuntu-latest | |
| rust_target: x86_64-unknown-linux-gnu | |
| code_target: linux-x64 | |
| - os: ubuntu-latest | |
| rust_target: aarch64-unknown-linux-gnu | |
| code_target: linux-arm64 | |
| - os: ubuntu-latest | |
| rust_target: armv7-unknown-linux-gnueabihf | |
| code_target: linux-armhf | |
| - os: ubuntu-latest | |
| rust_target: x86_64-unknown-linux-musl | |
| code_target: alpine-x64 | |
| - os: ubuntu-latest | |
| rust_target: aarch64-unknown-linux-musl | |
| code_target: alpine-arm64 | |
| runs-on: ${{ matrix.platform.os }} | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".node-version" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| cache-bin: "true" | |
| - name: Build harper-ls | |
| uses: houseabsolute/actions-rust-cross@fe6ede73c7f0a50412ec05994e2aa5a7bf635eac # v1.0.7 | |
| with: | |
| target: ${{ matrix.platform.rust_target }} | |
| args: "--locked --release --bin harper-ls" | |
| force-use-cross: ${{ matrix.platform.os == 'ubuntu-latest' }} | |
| strip: true | |
| - name: Package extension | |
| id: package_extension | |
| shell: bash | |
| run: | | |
| bin_dir="packages/vscode-plugin/bin" | |
| release_dir="target/${{ matrix.platform.rust_target }}/release" | |
| mkdir "$bin_dir" | |
| if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then | |
| cp "${release_dir}/harper-ls.exe" "$bin_dir" | |
| else | |
| cp "${release_dir}/harper-ls" "$bin_dir" | |
| fi | |
| just package-vscode ${{ matrix.platform.code_target }} | |
| echo artifact=$(echo packages/vscode-plugin/*.vsix) >> $GITHUB_OUTPUT | |
| - name: Release artifacts | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 | |
| with: | |
| artifacts: "./packages/vscode-plugin/*.vsix" | |
| allowUpdates: true | |
| draft: true | |
| - name: Publish to OpenVSX | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: HaaLeo/publish-vscode-extension@ca5561daa085dee804bf9f37fe0165785a9b14db # v2.0.0 | |
| with: | |
| pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
| packagePath: "./packages/vscode-plugin/" | |
| extensionFile: ${{ steps.package_extension.outputs.artifact }} | |
| skipDuplicate: true | |
| - name: Publish to the Visual Studio Marketplace | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: HaaLeo/publish-vscode-extension@ca5561daa085dee804bf9f37fe0165785a9b14db # v2.0.0 | |
| with: | |
| pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
| packagePath: "./packages/vscode-plugin/" | |
| extensionFile: ${{ steps.package_extension.outputs.artifact }} | |
| registryUrl: https://marketplace.visualstudio.com |