9a1fb33996
Clarified the naming convention for macOS build artifacts by specifying 'arm64' in the filenames for the zipped app bundle and disk image installer.
4.1 KiB
4.1 KiB
YTSage CI/CD Workflow
This repository uses GitHub Actions to automatically build and release YTSage for multiple platforms. The workflow is designed to be manually triggered, allowing for flexibility in building specific versions or platforms on demand.
How It Works
Trigger
The workflows are triggered manually via the GitHub Actions "Workflow Dispatch" interface. This allows you to specify the version number explicitly (e.g., 1.0.0) at runtime.
Workflows
- Create All Releases (
release-all.yml): The master workflow. Triggering this will automatically run the Windows, Linux, and macOS builds in parallel with the version you provide. - Platform Specific: You can also trigger
Build Windows Release,Build Linux Release, orBuild macOS Releaseindividually if you only need updates for one OS.
Build Process
- Setup: Uses Python 3.13 on all platforms
- Builds: Creates platform-specific executables using cx_Freeze
- Packages: Generates native package formats for each platform
- Release: Creates or updates a draft GitHub release with the artifacts
Usage
Creating a Full Release (Recommended)
- Go to the Actions tab in the GitHub repository.
- Select "Create All Releases" from the left sidebar.
- Click Run workflow.
- Enter the Version name (e.g.,
1.0.0).Note: Do not include the 'v' prefix in the input field unless you want your filenames to be
v1.0.0. - Click the green Run workflow button.
- The system will trigger the Windows, Linux, and macOS jobs. Once complete, a draft release will be available in the Releases section.
Creating a Single Platform Build
- Go to the Actions tab.
- Select the specific workflow (e.g., "Build Windows Release").
- Click Run workflow and enter the version.
- Only that specific platform's artifacts will be built and added to the release.
Release Artifacts
The workflow creates the following files based on the platform:
Windows
YTSage-v{version}-portable.zip- Standard portable versionYTSage-v{version}-ffmpeg-portable.zip- FFmpeg bundle portable
Linux
YTSage-v{version}-{arch}.AppImage- AppImage portable (x86_64, aarch64)YTSage-v{version}-{arch}.rpm- RPM packageYTSage-v{version}-{arch}.deb- Debian packageYTSage-v{version}-{arch}.flatpak- Flatpak bundle
macOS
YTSage-v{version}-arm64.app.zip- Zipped application bundleYTSage-v{version}-arm64.dmg- Disk image installer
Workflow Features
Multi-Platform Support
- Windows: Uses PowerShell scripts with cx_Freeze
- Linux: Uses Bash scripts with cx_Freeze, creates AppImage, RPM, and DEB
- macOS: Matrix build for both Intel (x64) and Apple Silicon (arm64)
Manual Versioning
- Version is strictly controlled by the input you provide at runtime.
- No longer dependent on git tags, reducing accidental releases.
Caching
- Python dependencies and virtual environments are cached to speed up builds.
Error Handling
- Comprehensive error checking at each step.
- Artifact verification before upload.
Security
- Uses official GitHub Actions.
- Secure token handling via
secrets: inheritfor the master workflow.
Manual Intervention
After Workflow Completion
- Review the draft release in GitHub.
- Test the artifacts if needed.
- Edit release notes to add changelogs or descriptions.
- Publish the release when ready (change from Draft to Published).
Configuration
Modifying the Workflow
The workflow files are located in .github/workflows/:
release-all.yml- Master workflow that orchestrates the othersbuild-windows.yml- Windows builds logicbuild-linux.yml- Linux builds logicbuild-macos.yml- macOS builds logic
Key Configuration Options
PYTHON_VERSION: Python version (currently 3.13)versioninput: Defined as a required string in all workflows.
Notes
- All builds use cx_Freeze for packaging.
- FFmpeg binaries are bundled where needed (Windows).
- Screenshots are removed from builds to reduce size.
- Draft releases allow for review before publication.