refactor neovide, mobdap and bridge download handler into single rele… #39
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Release ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - name: Linux x86 | |
| os: ubuntu-latest | |
| cargo-tools: cargo-edit,cargo-cross | |
| artifact: | |
| sidecar: target/x86_64-unknown-linux-gnu/release/libdefold_nvim_sidecar.so | |
| bridge: target/x86_64-unknown-linux-gnu/release/defold-nvim-bridge | |
| dist: | |
| sidecar: target/release/linux-x86-libdefold_nvim_sidecar.so | |
| bridge: target/release/linux-x86-defold-nvim-bridge | |
| - name: MacOS x86 | |
| os: macos-15-intel | |
| cargo-tools: cargo-edit | |
| artifact: | |
| sidecar: target/release/libdefold_nvim_sidecar.dylib | |
| bridge: target/release/defold-nvim-bridge | |
| dist: | |
| sidecar: target/release/macos-x86-libdefold_nvim_sidecar.dylib | |
| bridge: target/release/macos-x86-defold-nvim-bridge | |
| - name: MacOS ARM | |
| os: macos-latest | |
| cargo-tools: cargo-edit | |
| artifact: | |
| sidecar: target/release/libdefold_nvim_sidecar.dylib | |
| bridge: target/release/defold-nvim-bridge | |
| dist: | |
| sidecar: target/release/macos-arm-libdefold_nvim_sidecar.dylib | |
| bridge: target/release/macos-arm-defold-nvim-bridge | |
| - name: Windows x86 | |
| os: windows-latest | |
| cargo-tools: cargo-edit | |
| artifact: | |
| sidecar: target/release/defold_nvim_sidecar.dll | |
| bridge: target/release/defold-nvim-bridge.exe | |
| dist: | |
| sidecar: target/release/windows-x86-defold_nvim_sidecar.dll | |
| bridge: target/release/windows-x86-defold-nvim-bridge | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: ${{ matrix.config.cargo-tools }} | |
| - name: set version ${{ matrix.config.name }} | |
| shell: bash | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG_NAME#v} | |
| cargo set-version $VERSION | |
| - name: build ${{ matrix.config.name }} | |
| if: contains(matrix.config.os, 'ubuntu') | |
| run: | | |
| cargo cross build --release --target x86_64-unknown-linux-gnu | |
| - name: build ${{ matrix.config.name }} | |
| if: contains(matrix.config.os, 'macos') | |
| run: MACOSX_DEPLOYMENT_TARGET="13" cargo build --release | |
| - name: build ${{ matrix.config.name }} | |
| if: contains(matrix.config.os, 'windows') | |
| run: cargo build --release | |
| - name: prepare ${{ matrix.config.name }} | |
| run: | | |
| # rename builds to be unique | |
| mv "${{ matrix.config.artifact.sidecar }}" "${{ matrix.config.dist.sidecar }}" | |
| mv "${{ matrix.config.artifact.bridge }}" "${{ matrix.config.dist.bridge }}" | |
| # generate sha256 sum | |
| shasum -a 256 "${{ matrix.config.dist.sidecar }}" > "${{ matrix.config.dist.sidecar }}.sha256" | |
| shasum -a 256 "${{ matrix.config.dist.bridge }}" > "${{ matrix.config.dist.bridge }}.sha256" | |
| - name: upload ${{ matrix.config.name }} | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| ${{ matrix.config.dist.sidecar }} | |
| ${{ matrix.config.dist.bridge }} | |
| ${{ matrix.config.dist.sidecar }}.sha256 | |
| ${{ matrix.config.dist.bridge }}.sha256 |