Add stream-uploader
#1
Workflow file for this run
This file contains 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: build stream uploader | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "stream-uploader/**" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "stream-uploader/**" | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
defaults: | |
run: | |
working-directory: stream-uploader | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Setup Yarn | |
run: corepack enable yarn | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
stream-uploader/node_modules | |
~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: stream-uploader/src-tauri | |
- name: Install dependencies (macOS) | |
if: matrix.platform == 'macos-latest' | |
run: | | |
rustup target add aarch64-apple-darwin | |
rustup target add x86_64-apple-darwin | |
- name: Install frontend dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build frontend | |
run: yarn build | |
- name: Build the app (macOS) | |
if: matrix.platform == 'macos-latest' | |
run: | | |
yarn tauri build -- --target universal-apple-darwin | |
- name: Build the app (Windows) | |
if: matrix.platform == 'windows-latest' | |
run: yarn tauri build | |
- name: Upload artifacts (macOS) | |
if: matrix.platform == 'macos-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: stream-uploader-macos | |
path: | | |
stream-uploader/src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg | |
stream-uploader/src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app | |
- name: Upload artifacts (Windows) | |
if: matrix.platform == 'windows-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: stream-uploader-windows | |
path: | | |
stream-uploader/src-tauri/target/release/bundle/msi/*.msi | |
stream-uploader/src-tauri/target/release/bundle/nsis/*.exe |