Update CI/CD README for manual workflow triggers
Revamps the CI/CD documentation to reflect the new manual workflow dispatch system, replacing tag-based triggers. Adds detailed instructions for running full or platform-specific builds, clarifies artifact naming, and updates configuration and process notes to match the current GitHub Actions setup.
This commit is contained in:
+45
-80
@@ -1,38 +1,40 @@
|
|||||||
# YTSage CI/CD Workflow
|
# YTSage CI/CD Workflow
|
||||||
|
|
||||||
This repository uses GitHub Actions to automatically build and release YTSage for multiple platforms when version tags are pushed.
|
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
|
## How It Works
|
||||||
|
|
||||||
### Trigger
|
### Trigger
|
||||||
The workflow is triggered when you push a git tag that starts with `v` (e.g., `v4.9.5`, `v4.9.5`).
|
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`, or `Build macOS Release` individually if you only need updates for one OS.
|
||||||
|
|
||||||
### Build Process
|
### Build Process
|
||||||
1. **Setup**: Uses Python 3.13.6 on all platforms
|
1. **Setup**: Uses Python 3.13 on all platforms
|
||||||
2. **Builds**: Creates platform-specific executables using cx_Freeze
|
2. **Builds**: Creates platform-specific executables using cx_Freeze
|
||||||
3. **Packages**: Generates native package formats for each platform
|
3. **Packages**: Generates native package formats for each platform
|
||||||
4. **Release**: Creates a draft GitHub release with all artifacts
|
4. **Release**: Creates or updates a draft GitHub release with the artifacts
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Creating a Release
|
### Creating a Full Release (Recommended)
|
||||||
|
|
||||||
1. **Update version** in your source code if needed
|
1. Go to the **Actions** tab in the GitHub repository.
|
||||||
2. **Commit your changes**:
|
2. Select **"Create All Releases"** from the left sidebar.
|
||||||
```bash
|
3. Click **Run workflow**.
|
||||||
git add .
|
4. Enter the **Version name** (e.g., `1.0.0`).
|
||||||
git commit -m "Release v4.9.5"
|
> *Note: Do not include the 'v' prefix in the input field unless you want your filenames to be `v1.0.0`.*
|
||||||
```
|
5. Click the green **Run workflow** button.
|
||||||
|
6. The system will trigger the Windows, Linux, and macOS jobs. Once complete, a draft release will be available in the Releases section.
|
||||||
|
|
||||||
3. **Create and push a tag**:
|
### Creating a Single Platform Build
|
||||||
```bash
|
|
||||||
git tag v4.9.5
|
|
||||||
git push origin v4.9.5
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Watch the action**: Go to Actions tab in GitHub to monitor progress
|
1. Go to the **Actions** tab.
|
||||||
|
2. Select the specific workflow (e.g., **"Build Windows Release"**).
|
||||||
5. **Review draft release**: Once complete, check the Releases section for the draft
|
3. Click **Run workflow** and enter the version.
|
||||||
|
4. Only that specific platform's artifacts will be built and added to the release.
|
||||||
|
|
||||||
### Release Artifacts
|
### Release Artifacts
|
||||||
|
|
||||||
@@ -43,12 +45,12 @@ The workflow creates the following files based on the platform:
|
|||||||
- `YTSage-v{version}-ffmpeg-portable.zip` - FFmpeg bundle portable
|
- `YTSage-v{version}-ffmpeg-portable.zip` - FFmpeg bundle portable
|
||||||
|
|
||||||
#### Linux
|
#### Linux
|
||||||
- `YTSage-v{version}-{arch}.AppImage` - AppImage portable
|
- `YTSage-v{version}-{arch}.AppImage` - AppImage portable (x86_64, aarch64)
|
||||||
- `YTSage-v{version}-{arch}.rpm` - RPM package
|
- `YTSage-v{version}-{arch}.rpm` - RPM package
|
||||||
- `YTSage-v{version}-{arch}.deb` - Debian package
|
- `YTSage-v{version}-{arch}.deb` - Debian package
|
||||||
|
|
||||||
#### macOS
|
#### macOS
|
||||||
- `YTSage-v{version}-{arch}.app.zip` - Zipped application bundle
|
- `YTSage-v{version}-{arch}.app.zip` - Zipped application bundle (x64, arm64)
|
||||||
- `YTSage-v{version}-{arch}.dmg` - Disk image installer
|
- `YTSage-v{version}-{arch}.dmg` - Disk image installer
|
||||||
|
|
||||||
## Workflow Features
|
## Workflow Features
|
||||||
@@ -58,82 +60,45 @@ The workflow creates the following files based on the platform:
|
|||||||
- **Linux**: Uses Bash scripts with cx_Freeze, creates AppImage, RPM, and DEB
|
- **Linux**: Uses Bash scripts with cx_Freeze, creates AppImage, RPM, and DEB
|
||||||
- **macOS**: Matrix build for both Intel (x64) and Apple Silicon (arm64)
|
- **macOS**: Matrix build for both Intel (x64) and Apple Silicon (arm64)
|
||||||
|
|
||||||
### Automatic Version Detection
|
### Manual Versioning
|
||||||
- Extracts version from git tag (removes 'v' prefix)
|
- Version is strictly controlled by the input you provide at runtime.
|
||||||
- Names all artifacts consistently across platforms
|
- No longer dependent on git tags, reducing accidental releases.
|
||||||
|
|
||||||
### Caching
|
### Caching
|
||||||
- Python dependencies are cached to speed up builds
|
- Python dependencies and virtual environments are cached to speed up builds.
|
||||||
- Virtual environment is cached between runs
|
|
||||||
|
|
||||||
### Error Handling
|
### Error Handling
|
||||||
- Comprehensive error checking at each step
|
- Comprehensive error checking at each step.
|
||||||
- Detailed logging for troubleshooting
|
- Artifact verification before upload.
|
||||||
- Artifact verification before upload
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
- Uses official GitHub Actions
|
- Uses official GitHub Actions.
|
||||||
- No external dependencies
|
- Secure token handling via `secrets: inherit` for the master workflow.
|
||||||
- Secure token handling
|
|
||||||
|
|
||||||
## Manual Intervention
|
## Manual Intervention
|
||||||
|
|
||||||
### After Workflow Completion
|
### After Workflow Completion
|
||||||
1. **Review the draft release** in GitHub
|
1. **Review the draft release** in GitHub.
|
||||||
2. **Test the artifacts** if needed
|
2. **Test the artifacts** if needed.
|
||||||
3. **Edit release notes** if desired
|
3. **Edit release notes** to add changelogs or descriptions.
|
||||||
4. **Publish the release** when ready
|
4. **Publish the release** when ready (change from Draft to Published).
|
||||||
|
|
||||||
### Troubleshooting
|
|
||||||
If the workflow fails:
|
|
||||||
1. Check the Actions logs for error details
|
|
||||||
2. Ensure all required files are present
|
|
||||||
3. Verify the tag format is correct (`v*`)
|
|
||||||
4. Check that dependencies are properly listed
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Modifying the Workflow
|
### Modifying the Workflow
|
||||||
The workflow files are located in `.github/workflows/`:
|
The workflow files are located in `.github/workflows/`:
|
||||||
- `build-windows.yml` - Windows builds
|
- `release-all.yml` - Master workflow that orchestrates the others
|
||||||
- `build-linux.yml` - Linux builds
|
- `build-windows.yml` - Windows builds logic
|
||||||
- `build-macos.yml` - macOS builds
|
- `build-linux.yml` - Linux builds logic
|
||||||
|
- `build-macos.yml` - macOS builds logic
|
||||||
|
|
||||||
### Key Configuration Options
|
### Key Configuration Options
|
||||||
- `PYTHON_VERSION`: Python version (currently 3.13.6)
|
- `PYTHON_VERSION`: Python version (currently 3.13)
|
||||||
- Artifact naming patterns
|
- `version` input: Defined as a required string in all workflows.
|
||||||
- Release note templates
|
|
||||||
- Build optimization settings
|
|
||||||
|
|
||||||
### Adding New Build Types
|
|
||||||
To add new platform packages:
|
|
||||||
1. Create or modify workflow files in `.github/workflows/`
|
|
||||||
2. Target the appropriate OS runner (windows-latest, ubuntu-latest, macos-latest)
|
|
||||||
3. Use cx_Freeze or PyInstaller for packaging
|
|
||||||
4. Package the build output in platform-native formats
|
|
||||||
5. Upload the artifacts and include them in the release
|
|
||||||
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- All builds use cx_Freeze for packaging
|
- All builds use cx_Freeze for packaging.
|
||||||
- FFmpeg binaries are bundled where needed
|
- FFmpeg binaries are bundled where needed (Windows).
|
||||||
- Screenshots are removed from builds to reduce size
|
- Screenshots are removed from builds to reduce size.
|
||||||
- Draft releases allow for review before publication
|
- Draft releases allow for review before publication.
|
||||||
- macOS builds run on both Intel and Apple Silicon runners
|
|
||||||
|
|
||||||
## Example Tag Commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# For a new release
|
|
||||||
git tag v4.8.1
|
|
||||||
git push origin v4.8.1
|
|
||||||
|
|
||||||
# For a patch release
|
|
||||||
git tag v4.8.1
|
|
||||||
git push origin v4.8.1
|
|
||||||
|
|
||||||
# To delete a tag (if needed)
|
|
||||||
git tag -d v4.8.1
|
|
||||||
git push origin :refs/tags/v4.8.1
|
|
||||||
```
|
|
||||||
|
|||||||
Reference in New Issue
Block a user