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
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: lts/*
cache: 'npm'
bun-version: latest

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -53,7 +52,7 @@ jobs:
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:${PKG_CONFIG_PATH}" >> $GITHUB_ENV

- name: Install frontend dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Check Rust formatting
working-directory: src-tauri
Expand All @@ -72,4 +71,4 @@ jobs:
run: cargo test --all-features

- name: Build frontend
run: npm run build
run: bun run build
153 changes: 153 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: 'Publish Pre-Release'

on:
push:
tags:
- 'v*-beta*'
- 'v*-alpha*'
- 'v*-rc*'

jobs:
publish-tauri-prerelease:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-latest'
args: ''
- platform: 'windows-latest'
args: '--target x86_64-pc-windows-msvc'

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 \
wget \
file \
pkg-config \
libglib2.0-dev \
libwebkit2gtk-4.1-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf

- name: Set PKG_CONFIG_PATH for Linux
if: matrix.platform == 'ubuntu-latest'
run: |
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:${PKG_CONFIG_PATH}" >> $GITHUB_ENV

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Cache Rust build
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install frontend dependencies
run: bun install --frozen-lockfile

- name: Set build environment variables
shell: bash
run: |
echo "GIT_COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_BRANCH=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo "BUILD_TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> $GITHUB_ENV

- name: Determine pre-release type
shell: bash
run: |
TAG_NAME=${GITHUB_REF_NAME}
if [[ $TAG_NAME == *"alpha"* ]]; then
echo "PRERELEASE_TYPE=Alpha" >> $GITHUB_ENV
echo "PRERELEASE_EMOJI=🚧" >> $GITHUB_ENV
echo "TAG_PREFIX=alpha" >> $GITHUB_ENV
elif [[ $TAG_NAME == *"beta"* ]]; then
echo "PRERELEASE_TYPE=Beta" >> $GITHUB_ENV
echo "PRERELEASE_EMOJI=🧪" >> $GITHUB_ENV
echo "TAG_PREFIX=beta" >> $GITHUB_ENV
elif [[ $TAG_NAME == *"rc"* ]]; then
echo "PRERELEASE_TYPE=Release Candidate" >> $GITHUB_ENV
echo "PRERELEASE_EMOJI=🎯" >> $GITHUB_ENV
echo "TAG_PREFIX=rc" >> $GITHUB_ENV
else
echo "PRERELEASE_TYPE=Pre-Release" >> $GITHUB_ENV
echo "PRERELEASE_EMOJI=⚠️" >> $GITHUB_ENV
echo "TAG_PREFIX=pre" >> $GITHUB_ENV
fi

# Extract version number from tag (e.g., v1.0.0-alpha.1 -> 1.0.0 and 1)
BASE_VERSION=$(echo $TAG_NAME | sed -E 's/v([0-9]+\.[0-9]+\.[0-9]+)-.*/\1/')
PRERELEASE_NUMBER=$(echo $TAG_NAME | sed -E 's/.*\.(.*)/\1/')
echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_ENV
echo "PRERELEASE_NUMBER=$PRERELEASE_NUMBER" >> $GITHUB_ENV

- name: Build Tauri App
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
GIT_COMMIT_HASH: ${{ env.GIT_COMMIT_HASH }}
GIT_BRANCH: ${{ env.GIT_BRANCH }}
BUILD_TIMESTAMP: ${{ env.BUILD_TIMESTAMP }}
with:
tagName: ${{ github.ref_name }}
releaseName: '${{ env.PRERELEASE_EMOJI }} OBS Sync ${{ github.ref_name }}'
releaseBody: |
## ${{ env.PRERELEASE_EMOJI }} Pre-Release: ${{ env.PRERELEASE_TYPE }}

**⚠️ This is a pre-release version intended for testing purposes.**

### What's New in This Pre-Release
- Auto-generated pre-release from GitHub Actions
- Built from commit: ${{ env.GIT_COMMIT_HASH }}
- Branch: ${{ env.GIT_BRANCH }}
- Build time: ${{ env.BUILD_TIMESTAMP }}

### Important Notes
- ⚠️ **Use at your own risk**: This version may contain bugs or unstable features
- 🧪 **For testing only**: Not recommended for production use
- 📝 **Feedback welcome**: Please report issues on GitHub
- 🔄 **Auto-update**: This version supports automatic updates to newer pre-releases and stable releases

### Download Instructions
Select the appropriate installer for your platform:
- **Windows**: `.msi` file
- **macOS**: `.dmg` file
- **Linux**: `.AppImage` or `.deb` file

### How to Help
1. Download and test this pre-release
2. Report any issues you encounter
3. Provide feedback on new features
4. Help us make the stable release better!

---
📋 **Full changelog and stable releases**: [View all releases](https://github.com/${{ github.repository }}/releases)
releaseDraft: false
prerelease: true
includeUpdaterJson: true
args: ${{ matrix.args }}
74 changes: 51 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
name: Release
name: 'Publish Release'

on:
push:
tags:
- 'v*.*.*'

permissions:
contents: write
- 'v*'

jobs:
release:
if: startsWith(github.ref, 'refs/tags/v')
publish-tauri:
permissions:
contents: write
# Skip this job if the tag contains pre-release indicators
if: ${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') && !contains(github.ref_name, 'rc') }}
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-latest'
args: ''
- platform: 'windows-latest'
args: ''
- platform: 'macos-latest'
args: ''
args: '--target x86_64-pc-windows-msvc'

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: lts/*
cache: 'npm'
bun-version: latest

- name: Install Rust toolchain
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Cache Rust build
uses: swatinem/rust-cache@v2
Expand Down Expand Up @@ -68,19 +71,44 @@ jobs:
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:${PKG_CONFIG_PATH}" >> $GITHUB_ENV

- name: Install frontend dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Build frontend
run: npm run build
- name: Set build environment variables
shell: bash
run: |
echo "GIT_COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_BRANCH=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo "BUILD_TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> $GITHUB_ENV

- name: Publish Tauri builds
- name: Build Tauri App
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
GIT_COMMIT_HASH: ${{ env.GIT_COMMIT_HASH }}
GIT_BRANCH: ${{ env.GIT_BRANCH }}
BUILD_TIMESTAMP: ${{ env.BUILD_TIMESTAMP }}
with:
tagName: ${{ github.ref_name }}
releaseName: 'OBS Sync ${{ github.ref_name }}'
releaseBody: '🚀 Release version ${{ github.ref_name }}'
tagName: v__VERSION__
releaseName: 'OBS Sync v__VERSION__'
releaseBody: |
## What's Changed
- Auto-generated release from GitHub Actions
- Built from commit: ${{ env.GIT_COMMIT_HASH }}
- Branch: ${{ env.GIT_BRANCH }}
- Build time: ${{ env.BUILD_TIMESTAMP }}

## Download
Select the appropriate installer for your platform:
- **Windows**: `.msi` file
- **macOS**: `.dmg` file
- **Linux**: `.AppImage` or `.deb` file

## Auto-Update
This release supports automatic updates. The app will check for updates on startup and you can manually check via the system tray menu.

See the assets below to download and install this version.
releaseDraft: false
prerelease: false
includeUpdaterJson: true
args: ${{ matrix.args }}
83 changes: 83 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: 'Test Build'

on:
push:
branches: [main, master, development, feature/*]
pull_request:
branches: [main, master, development]

jobs:
test-tauri:
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'ubuntu-latest'
args: ''
- platform: 'windows-latest'
args: ''

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 \
wget \
file \
pkg-config \
libglib2.0-dev \
libwebkit2gtk-4.1-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf

- name: Set PKG_CONFIG_PATH for Linux
if: matrix.platform == 'ubuntu-latest'
run: |
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:${PKG_CONFIG_PATH}" >> $GITHUB_ENV

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Cache Rust build
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install frontend dependencies
run: bun install --frozen-lockfile

- name: Set build environment variables
shell: bash
run: |
echo "GIT_COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_BRANCH=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo "BUILD_TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> $GITHUB_ENV

- name: Test Build Tauri App
uses: tauri-apps/tauri-action@v0
env:
GIT_COMMIT_HASH: ${{ env.GIT_COMMIT_HASH }}
GIT_BRANCH: ${{ env.GIT_BRANCH }}
BUILD_TIMESTAMP: ${{ env.BUILD_TIMESTAMP }}
with:
args: ${{ matrix.args }}
# Don't create releases for test builds
includeRelease: false
Loading