Skip to content

Build & Release

Build & Release #1

Workflow file for this run

name: Build & Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
target: aarch64-apple-darwin
python-version: "3.12"
- platform: macos-13
target: x86_64-apple-darwin
python-version: "3.12"
- platform: windows-latest
target: x86_64-pc-windows-msvc
python-version: "3.12"
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build Python sidecar
run: pyinstaller --noconfirm pyinstaller.spec
- name: Copy sidecar binary (Unix)
if: runner.os != 'Windows'
run: |
mkdir -p src-tauri/binaries
cp dist/doctorfill-server src-tauri/binaries/doctorfill-server-${{ matrix.target }}
chmod +x src-tauri/binaries/doctorfill-server-${{ matrix.target }}
- name: Copy sidecar binary (Windows)
if: runner.os == 'Windows'
run: |
mkdir -p src-tauri/binaries
cp dist/doctorfill-server.exe src-tauri/binaries/doctorfill-server-${{ matrix.target }}.exe
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
- name: Install npm dependencies
run: npm install
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: "DoctorFill ${{ github.ref_name }}"
releaseBody: |
See the changelog for details.
releaseDraft: false
prerelease: true
args: --target ${{ matrix.target }}