Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 70 additions & 26 deletions .github/workflows/pre-release.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
name: "pre-release"
name: "Release"
run-name: "Release - ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || github.event.inputs.name || github.ref_name }}"

on:
push:
branches: [ "main" ]


tags:
- v**
workflow_dispatch:
inputs:
name:
description: 'Development release name'
required: false
default: ''

env:
CARGO_TERM_COLOR: always
Expand All @@ -20,12 +27,33 @@ jobs:
sudo apt-get install libx11-dev libxtst-dev
sudo apt-get install libadwaita-1-dev libgtk-4-dev
- name: Release Build
run: cargo build --release
run: |
cargo build --release
cp target/release/lan-mouse lan-mouse-linux-x86_64
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: lan-mouse-linux-x86_64
path: lan-mouse-linux-x86_64

linux-arm64-release-build:
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install libx11-dev libxtst-dev
sudo apt-get install libadwaita-1-dev libgtk-4-dev
- name: Release Build
run: |
cargo build --release
cp target/release/lan-mouse lan-mouse-linux-arm64
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: lan-mouse-linux
path: target/release/lan-mouse
name: lan-mouse-linux-arm64
path: lan-mouse-linux-arm64

windows-release-build:
runs-on: windows-latest
Expand Down Expand Up @@ -72,12 +100,12 @@ jobs:
mkdir "lan-mouse-windows"
Get-Childitem -Path "C:\\gtk-build\\gtk\\x64\\release\\bin\\*.dll" -File -Recurse | Copy-Item -Destination "lan-mouse-windows"
Copy-Item -Path "target\release\lan-mouse.exe" -Destination "lan-mouse-windows"
Compress-Archive -Path "lan-mouse-windows\*" -DestinationPath lan-mouse-windows.zip
Compress-Archive -Path "lan-mouse-windows\*" -DestinationPath lan-mouse-windows-x86_64.zip
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: lan-mouse-windows
path: lan-mouse-windows.zip
name: lan-mouse-windows-x86_64
path: lan-mouse-windows-x86_64.zip

macos-release-build:
runs-on: macos-15-intel
Expand Down Expand Up @@ -109,8 +137,8 @@ jobs:
name: lan-mouse-macos-intel
path: target/release/bundle/osx/lan-mouse-macos-intel.zip

macos-aarch64-release-build:
runs-on: macos-14
macos-arm64-release-build:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: install dependencies
Expand All @@ -120,7 +148,7 @@ jobs:
- name: Release Build
run: |
cargo build --release
cp target/release/lan-mouse lan-mouse-macos-aarch64
cp target/release/lan-mouse lan-mouse-macos-arm64
- name: Make icns
run: scripts/makeicns.sh
- name: Install cargo bundle
Expand All @@ -132,29 +160,45 @@ jobs:
- name: Zip bundle
run: |
cd target/release/bundle/osx
zip -r "lan-mouse-macos-aarch64.zip" "Lan Mouse.app"
zip -r "lan-mouse-macos-arm64.zip" "Lan Mouse.app"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: lan-mouse-macos-aarch64
path: target/release/bundle/osx/lan-mouse-macos-aarch64.zip
name: lan-mouse-macos-arm64
path: target/release/bundle/osx/lan-mouse-macos-arm64.zip

pre-release:
name: "Pre Release"
needs: [windows-release-build, linux-release-build, macos-release-build, macos-aarch64-release-build]
release:
name: "Release"
needs: [windows-release-build, linux-release-build, linux-arm64-release-build, macos-release-build, macos-arm64-release-build]
runs-on: "ubuntu-latest"
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
- name: Create Pre-Release
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: softprops/action-gh-release@v2
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.event.inputs.name || github.ref_name }}
name: ${{ github.event.inputs.name || github.ref_name }}
prerelease: true
title: "Development Build"
generate_release_notes: true
files: |
lan-mouse-linux-x86_64/lan-mouse-linux-x86_64
lan-mouse-linux-arm64/lan-mouse-linux-arm64
lan-mouse-macos-intel/lan-mouse-macos-intel.zip
lan-mouse-macos-arm64/lan-mouse-macos-arm64.zip
lan-mouse-windows-x86_64/lan-mouse-windows-x86_64.zip
- name: Create Tagged Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.ref_name }}
generate_release_notes: true
files: |
lan-mouse-linux/lan-mouse
lan-mouse-linux-x86_64/lan-mouse-linux-x86_64
lan-mouse-linux-arm64/lan-mouse-linux-arm64
lan-mouse-macos-intel/lan-mouse-macos-intel.zip
lan-mouse-macos-aarch64/lan-mouse-macos-aarch64.zip
lan-mouse-windows/lan-mouse-windows.zip
lan-mouse-macos-arm64/lan-mouse-macos-arm64.zip
lan-mouse-windows-x86_64/lan-mouse-windows-x86_64.zip
154 changes: 0 additions & 154 deletions .github/workflows/tagged-release.yml

This file was deleted.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Lan Mouse

[![CI](https://github.com/feschber/lan-mouse/actions/workflows/rust.yml/badge.svg)](https://github.com/feschber/lan-mouse/actions/workflows/rust.yml) [![Cachix](https://github.com/feschber/lan-mouse/actions/workflows/cachix.yml/badge.svg)](https://github.com/feschber/lan-mouse/actions/workflows/cachix.yml) [![Pre-release](https://github.com/feschber/lan-mouse/actions/workflows/pre-release.yml/badge.svg)](https://github.com/feschber/lan-mouse/actions/workflows/pre-release.yml) [![Tagged release](https://github.com/feschber/lan-mouse/actions/workflows/tagged-release.yml/badge.svg)](https://github.com/feschber/lan-mouse/actions/workflows/tagged-release.yml)

[![crates.io](https://img.shields.io/crates/v/lan-mouse.svg)](https://crates.io/crates/lan-mouse) [![license](https://img.shields.io/crates/l/lan-mouse.svg)](https://github.com/feschber/lan-mouse/blob/main/Cargo.toml)

Lan Mouse is a *cross-platform* mouse and keyboard sharing software similar to universal-control on Apple devices.
It allows for using multiple PCs via a single set of mouse and keyboard.
This is also known as a Software KVM switch.
Expand Down
Loading