Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.

Add Velopack Support with Github Action#42

Merged
Jack251970 merged 4 commits intomasterfrom
dev
Nov 14, 2025
Merged

Add Velopack Support with Github Action#42
Jack251970 merged 4 commits intomasterfrom
dev

Conversation

@Jack251970
Copy link
Copy Markdown
Owner

This pull request introduces automated release packaging and distribution for the Editor.Desktop application using Velopack and GitHub Actions. It adds cross-platform build scripts, integrates Velopack into the build process, and sets up a workflow to create and publish releases for Linux, macOS, and Windows.

Release automation and packaging:

  • Added a GitHub Actions workflow (.github/workflows/release.yml) to build the application on Linux and macOS, package it using Velopack, and automatically create GitHub Releases when a new version tag is pushed.
  • Integrated Velopack into the project by adding it as a dependency in Editor.Desktop.csproj and initializing it at application startup in Program.cs. [1] [2] [3]

Cross-platform build scripts:

  • Added platform-specific build scripts for Linux (build-linux.sh), macOS (build-osx.sh), and Windows (build-win.sh, build-win.bat) to compile the application, package it with Velopack, and handle versioning and icons. [1] [2] [3] [4]

Resource management:

  • Updated the project file to remove unused icon resources (icon.png, icon.icns) from the Avalonia resource list.

Removed references to `icon.png` and `icon.icns` in the `Editor.Desktop.csproj` file. Added new binary files for `icon.icns` and `icon.png` to the project, likely as updated or replacement resources.
Added a package reference for Velopack in `Editor.Desktop.csproj` to include the library as a dependency. Updated `Program.cs` to import the Velopack namespace and modified the `Main` method to initialize and run `VelopackApp` early in the application startup process. This ensures proper setup of Velopack before other application logic.
Added `build-linux.sh` to automate the build process for Linux,
including cleaning, publishing, and packaging with Velopack.

Added `build-osx.sh` to automate the build process for macOS,
with similar functionality as the Linux script.

Added `build-win.bat` for Windows builds using a batch script,
supporting publishing and packaging with Velopack.

Added `build-win.sh` for Windows builds using a Bash script,
providing an alternative to the batch script with additional
cleanup functionality.
Added a new `release.yml` workflow to automate the build and
release process. The workflow triggers on `push` events for
tags matching `v*.*.*`. It includes a `build` job that runs
on a matrix of OSes (`ubuntu-latest` and `macos-latest`),
sets up the .NET SDK (v9.0.x), installs the `vpk` CLI,
restores dependencies, and builds the project using
platform-specific scripts. Artifacts are uploaded for each
platform.

Introduced a `release` job that runs on tag events, downloads
artifacts, and creates a GitHub Release using the
`softprops/action-gh-release@v2` action. This workflow
streamlines the multi-platform build and release process.
@Jack251970 Jack251970 requested a review from Copilot November 14, 2025 05:27
@Jack251970 Jack251970 added the enhancement New feature or request label Nov 14, 2025
@Jack251970 Jack251970 merged commit c58f1d5 into master Nov 14, 2025
7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds automated release packaging and distribution for the Editor.Desktop application using Velopack and GitHub Actions. The implementation includes cross-platform build scripts for Linux, macOS, and Windows, integrates Velopack SDK into the application startup, and creates a CI/CD workflow for automatic release creation when version tags are pushed.

Key changes:

  • Velopack integration in application startup with early initialization
  • Platform-specific build scripts automating compilation and package creation
  • GitHub Actions workflow for automated multi-platform releases

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Editor.Desktop/Program.cs Integrates Velopack initialization at application startup
Editor.Desktop/Editor.Desktop.csproj Adds Velopack dependency and removes unused icon resources
Editor.Desktop/build-win.sh Windows build script with Velopack packaging
Editor.Desktop/build-win.bat Windows batch build script
Editor.Desktop/build-osx.sh macOS build script with Velopack packaging
Editor.Desktop/build-linux.sh Linux build script with Velopack packaging
Editor.Desktop/icon.png New PNG icon resource for the application
Editor.Desktop/icon.icns New macOS icon resource
.github/workflows/release.yml GitHub Actions workflow for automated releases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


echo ""
echo "Building Velopack Release v$BUILD_VERSION"
vpk [win] pack --runtime win-x64 -u Editor.Desktop --packTitle "MathEditor" -v $BUILD_VERSION -o "$RELEASE_DIR" -p "$PUBLISH_DIR" -e "Editor.Desktop.exe" -i "$ICON_PATH"
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The syntax vpk [win] appears incorrect. Based on Velopack documentation, the command should be vpk pack without brackets around the platform. The [win] syntax is not valid for the Velopack CLI. This should be: vpk pack --runtime win-x64 ...

Suggested change
vpk [win] pack --runtime win-x64 -u Editor.Desktop --packTitle "MathEditor" -v $BUILD_VERSION -o "$RELEASE_DIR" -p "$PUBLISH_DIR" -e "Editor.Desktop.exe" -i "$ICON_PATH"
vpk pack --runtime win-x64 -u Editor.Desktop --packTitle "MathEditor" -v $BUILD_VERSION -o "$RELEASE_DIR" -p "$PUBLISH_DIR" -e "Editor.Desktop.exe" -i "$ICON_PATH"

Copilot uses AI. Check for mistakes.

echo ""
echo "Building Velopack Release v$BUILD_VERSION"
vpk [osx] pack -u Editor.Desktop --packTitle "MathEditor" -v $BUILD_VERSION -o "$RELEASE_DIR" -p "$PUBLISH_DIR" -e "Editor.Desktop" -i "$ICON_PATH"
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The syntax vpk [osx] appears incorrect. Based on Velopack documentation, the command should be vpk pack without brackets around the platform. The [osx] syntax is not valid for the Velopack CLI. This should be: vpk pack -u Editor.Desktop ...

Suggested change
vpk [osx] pack -u Editor.Desktop --packTitle "MathEditor" -v $BUILD_VERSION -o "$RELEASE_DIR" -p "$PUBLISH_DIR" -e "Editor.Desktop" -i "$ICON_PATH"
vpk pack -u Editor.Desktop --packTitle "MathEditor" -v $BUILD_VERSION -o "$RELEASE_DIR" -p "$PUBLISH_DIR" -e "Editor.Desktop" -i "$ICON_PATH"

Copilot uses AI. Check for mistakes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants