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
93 changes: 93 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Build Executables

# Reusable workflow that builds PyInstaller executables for all platforms.
# Does not handle packaging or publishing - that's the caller's responsibility.

on:
workflow_call:
inputs:
version:
description: "Version string for the build"
required: true
type: string

jobs:
build-windows:
if: github.repository_owner == 'synodic'
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.14"
cache: true

- name: Install dependencies
run: pdm install -G build

- name: Build executable
run: pdm run pyinstaller tool/pyinstaller/synodic.spec --distpath dist

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-windows-x64
path: dist/*

build-linux:
if: github.repository_owner == 'synodic'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxcb-cursor0 libxkbcommon-x11-0

- name: Install PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.14"
cache: true

- name: Install dependencies
run: pdm install -G build

- name: Build executable
run: pdm run pyinstaller tool/pyinstaller/synodic.spec --distpath dist

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-linux-x64
path: dist/*

build-macos:
if: github.repository_owner == 'synodic'
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.14"
cache: true

- name: Install dependencies
run: pdm install -G build

- name: Build executable
run: pdm run pyinstaller tool/pyinstaller/synodic.spec --distpath dist

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-macos-x64
path: dist/*
75 changes: 60 additions & 15 deletions .github/workflows/dev-release-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build Development Release
name: Development Release Build

# This workflow builds release artifacts for development versions
# published to PyPI on branch pushes. It can optionally trigger TUF updates.
# Builds and publishes development releases to GitHub Releases using Velopack.
# Triggered after successful Python dev release workflow.

on:
workflow_run:
Expand All @@ -19,29 +19,74 @@ jobs:
if: github.event.workflow_run.conclusion == 'success' && github.repository == 'synodic/synodic-client'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-tag.outputs.version }}
version: ${{ steps.set-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none

- name: Gather Tag Information
id: tag-info
uses: synodic/Tag-Metadata@v1
- name: Semantic Version
id: version
uses: PaulHatch/semantic-version@v6.0.1
with:
tag_prefix: "v"
version_format: "${major}.${minor}.${patch}"

- name: Set Tag
id: set-tag
- name: Set Version
id: set-version
run: |
version=${{steps.tag-info.outputs.next-tag}}.dev${{github.run_number}}
version=${{ steps.version.outputs.version }}.dev${{ github.run_number }}
echo "version=${version}" >> $GITHUB_OUTPUT
echo "Development version: $version"

build:
needs: get-version
uses: ./.github/workflows/release-build.yml
uses: ./.github/workflows/build.yml
with:
version: ${{ needs.get-version.outputs.version }}

package:
needs: [get-version, build]
uses: ./.github/workflows/package.yml
with:
version: ${{ needs.get-version.outputs.version }}
trigger_tuf: true
secrets:
ORG_UPDATE_TOKEN: ${{ secrets.ORG_UPDATE_TOKEN }}
channel: dev

release:
needs: [get-version, package]
runs-on: ubuntu-latest
steps:
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
name: velopack-releases
path: releases

- name: Delete existing dev release
run: gh release delete dev --cleanup-tag -y || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}

- name: Create dev release
uses: softprops/action-gh-release@v2
with:
tag_name: dev
name: "Development Build"
prerelease: true
make_latest: false
files: releases/*
body: |
**Latest Development Build**

Version: `${{ needs.get-version.outputs.version }}`
Commit: `${{ github.sha }}`

⚠️ This is a development build and may be unstable.

## Installation
- **Windows**: Download `synodic-Setup.exe` and run it
- **Linux**: Download the `.AppImage` file, make it executable with `chmod +x`, and run
- **macOS**: Download and extract the package
98 changes: 98 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Package with Velopack

# Reusable workflow that packages build artifacts with Velopack.
# Expects build artifacts from the build.yml workflow.

on:
workflow_call:
inputs:
version:
description: "Version string for the package"
required: true
type: string
channel:
description: "Velopack channel (stable or dev)"
required: true
type: string
outputs:
artifact-name:
description: "Name of the uploaded release artifact"
value: ${{ jobs.package.outputs.artifact-name }}

env:
VELOPACK_APP_ID: synodic

jobs:
package:
runs-on: ubuntu-latest
outputs:
artifact-name: velopack-releases
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: builds

- name: Install Velopack CLI
run: dotnet tool install -g vpk

- name: Download previous release (for delta packages)
continue-on-error: true
run: |
vpk download github \
--repoUrl https://github.com/${{ github.repository }} \
--channel ${{ inputs.channel }} \
--token ${{ secrets.GITHUB_TOKEN }}

- name: Install libfuse2 for AppImage
run: |
sudo apt-get update
sudo apt-get install -y libfuse2

- name: Create Velopack packages
run: |
mkdir -p releases

# Windows package
if [ -d "builds/build-windows-x64" ]; then
vpk pack \
--packId ${{ env.VELOPACK_APP_ID }} \
--packVersion ${{ inputs.version }} \
--packDir builds/build-windows-x64 \
--mainExe synodic.exe \
--packTitle "Synodic Client" \
--channel ${{ inputs.channel }} \
--outputDir releases
fi

# Linux package
if [ -d "builds/build-linux-x64" ]; then
vpk pack \
--packId ${{ env.VELOPACK_APP_ID }} \
--packVersion ${{ inputs.version }} \
--packDir builds/build-linux-x64 \
--mainExe synodic \
--packTitle "Synodic Client" \
--channel ${{ inputs.channel }} \
--outputDir releases
fi

# macOS package
if [ -d "builds/build-macos-x64" ]; then
vpk pack \
--packId ${{ env.VELOPACK_APP_ID }} \
--packVersion ${{ inputs.version }} \
--packDir builds/build-macos-x64 \
--mainExe synodic \
--packTitle "Synodic Client" \
--channel ${{ inputs.channel }} \
--outputDir releases
fi

ls -la releases/

- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: velopack-releases
path: releases/*
Loading