-
Notifications
You must be signed in to change notification settings - Fork 479
Add tag-based release workflow with version validation #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
There was a problem hiding this 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 implements an automated release workflow triggered by version tags (e.g., v3.1.1) that validates tag-project version consistency, builds all release artifacts, and creates GitHub releases with comprehensive documentation.
- Adds a GitHub Actions workflow that validates version tags against
build.gradle, builds all 4 AAR variants (4KB/16KB × video/image-only) plus a demo APK, and publishes them as GitHub releases - Documents the complete release process in README.md with step-by-step instructions for version bumping, tagging, and describes the automated artifact generation
- Ensures release consistency by failing the build if tag version doesn't match the project's
versionNameinbuild.gradle
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
New automated release workflow with version validation, multi-variant builds (via publish.sh), demo APK generation, and GitHub release creation with release notes |
README.md |
Added "Release Process" section documenting version update workflow, tag creation, automatic validation behavior, and artifact descriptions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/release.yml
Outdated
| - name: Generate release notes | ||
| id: release_notes | ||
| run: | | ||
| cat > /tmp/release_notes.md << 'EOF' |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heredoc delimiter should not use quotes (EOF instead of 'EOF') to allow GitHub Actions expressions to be interpolated. With single quotes, the ${{ }} expressions in the release notes will be written literally instead of being replaced with actual values.
Change line 149 to:
cat > /tmp/release_notes.md << EOFThis will ensure variables like ${{ steps.tag_version.outputs.tag_name }} and ${{ steps.tag_version.outputs.version }} are properly substituted throughout the release notes.
| cat > /tmp/release_notes.md << 'EOF' | |
| cat > /tmp/release_notes.md << EOF |
.github/workflows/release.yml
Outdated
| ./tasks.sh --enable-cmake --release --enable-video-module --build | ||
|
|
||
| # Find and copy the APK (look specifically for release build output) | ||
| APK_PATH=$(find "cgeDemo/build/outputs/apk/release" -name "*-release.apk" -o -name "*-release-unsigned.apk" | head -1) |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The find command has incorrect operator precedence for the -o (OR) operator. Without parentheses, this searches for *-release.apk in the specified directory OR *-release-unsigned.apk anywhere in the filesystem.
Change to:
APK_PATH=$(find "cgeDemo/build/outputs/apk/release" \( -name "*-release.apk" -o -name "*-release-unsigned.apk" \) | head -1)This ensures both name patterns are applied within the same directory search.
| APK_PATH=$(find "cgeDemo/build/outputs/apk/release" -name "*-release.apk" -o -name "*-release-unsigned.apk" | head -1) | |
| APK_PATH=$(find "cgeDemo/build/outputs/apk/release" \( -name "*-release.apk" -o -name "*-release-unsigned.apk" \) | head -1) |
.github/workflows/release.yml
Outdated
|
|
||
| echo "✅ All artifacts built successfully" | ||
| echo "📦 Generated artifacts:" | ||
| find /tmp/maven-repo -type f -name "*.aar" -o -name "*.pom" | sort |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The find command has incorrect operator precedence. Without parentheses, -o causes the second condition to search globally instead of within the specified directory.
Change to:
find /tmp/maven-repo -type f \( -name "*.aar" -o -name "*.pom" \) | sortThis ensures both name patterns are applied to files within /tmp/maven-repo.
| find /tmp/maven-repo -type f -name "*.aar" -o -name "*.pom" | sort | |
| find /tmp/maven-repo -type f \( -name "*.aar" -o -name "*.pom" \) | sort |
| echo " ✓ Packaged: $filename" | ||
| fi | ||
| done < <(find "$MAVEN_REPO/org/wysaid/gpuimage-plus" -name "*.aar") | ||
|
|
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding validation to ensure exactly 4 AAR files are packaged. This would catch build failures earlier and make the workflow more robust.
Add after line 140:
# Validate that we have exactly 4 AAR files
AAR_COUNT=$(find "$ARTIFACTS_DIR" -name "*.aar" | wc -l)
if [ "$AAR_COUNT" -ne 4 ]; then
echo "❌ Expected 4 AAR files but found $AAR_COUNT"
exit 1
fi| # Validate that we have exactly 4 AAR files | |
| AAR_COUNT=$(find "$ARTIFACTS_DIR" -name "*.aar" | wc -l) | |
| if [ "$AAR_COUNT" -ne 4 ]; then | |
| echo "❌ Expected 4 AAR files but found $AAR_COUNT" | |
| exit 1 | |
| fi | |
Fixes: - Fix find command operator precedence with proper parentheses - Fix heredoc delimiter to allow variable interpolation - Add --disable-16kb-page-size flag to demo APK build - Add validation for exactly 4 AAR files Features: - Add workflow_dispatch trigger for manual builds - Manual builds upload artifacts instead of creating releases - Differentiate manual vs tag-triggered builds in logs and summary
Implements automated release workflow triggered by version tags (e.g.,
v3.1.1) that validates tag-project version consistency and publishes all release artifacts.Changes
Workflow (
.github/workflows/release.yml)v*.*.*tags with numeric version validationversionNameinbuild.gradle, fails on mismatchpublish.sh(4KB/16KB page sizes × with/without video module)contents: writeonlyDocumentation (
README.md)Artifact Output
Each release produces:
gpuimage-plus-{version}.aar(default: 4KB, FFmpeg)gpuimage-plus-{version}-16k.aar(16KB page, FFmpeg)gpuimage-plus-{version}-min.aar(4KB, image-only)gpuimage-plus-{version}-16k-min.aar(16KB page, image-only)cgeDemo-{version}.apk(demo with video)Version mismatch example:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.