Skip to content

Build and Release

Build and Release #23

Workflow file for this run

name: Release build
on:
workflow_dispatch:
env:
VERSION: 1.2.2
jobs:
release:
permissions: write-all
strategy:
fail-fast: false
matrix:
platform: [macos-latest, macos-13, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential curl libssl-dev
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
- name: Install app dependencies
run: cargo install cargo-packager --locked
- name: Package Binary
run: cargo packager --release --verbose
- name: Release to GitHub
uses: softprops/action-gh-release@v2
with:
draft: true
generate_release_notes: true
tag_name: Raspirus v${{ env.VERSION }}
files: |
${{ matrix.platform == 'macos-latest' && 'target/release/Raspirus.app' || '' }}
${{ matrix.platform == 'macos-latest' && 'target/release/Raspirus_*_aarch64.dmg' || '' }}
${{ matrix.platform == 'macos-13' && 'target/release/Raspirus.app' || '' }}
${{ matrix.platform == 'macos-13' && 'target/release/Raspirus_*_x64.dmg' || '' }}
${{ matrix.platform == 'ubuntu-latest' && 'target/release/PKGBUILD' || '' }}
${{ matrix.platform == 'ubuntu-latest' && 'target/release/raspirus_*_amd64.deb' || '' }}
${{ matrix.platform == 'ubuntu-latest' && 'target/release/raspirus_*_x86_64.AppImage' || '' }}
${{ matrix.platform == 'windows-latest' && 'target/release/raspirus_*_x64_en-US.msi' || '' }}
${{ matrix.platform == 'windows-latest' && 'target/release/raspirus_*_x64-setup.exe' || '' }}