Skip to content

Add branch protections and CI/CD workflows - #12

Merged
justanotheratom merged 19 commits into
mainfrom
ci-cd-setup
Nov 13, 2025
Merged

Add branch protections and CI/CD workflows#12
justanotheratom merged 19 commits into
mainfrom
ci-cd-setup

Conversation

@iAmVishal16

Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/release-apk.yml Outdated
- Add automatic upload to Google Play Console when service account is configured
- Add play_track input for manual dispatch (internal/alpha/beta/production)
- Fix tag verification to ensure tag points exactly to main HEAD (addresses PR review)
- Update documentation with Play Console setup instructions
@iAmVishal16

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/release-apk.yml Outdated
Comment thread .github/workflows/release-apk.yml Outdated
Comment thread tools/configure_branch_protection.sh Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/release-apk.yml Outdated
Comment thread tools/configure_branch_protection.sh Outdated
…name

- Fix inputs context for tag pushes by using step outputs instead
- Delete unsigned APK after signing to prevent Play Console upload failures
- Fix branch protection script to use correct check name: 'Build APK / Assemble Release APK'
- Add step to safely set release variables for both workflow_dispatch and tag triggers
@iAmVishal16

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@justanotheratom justanotheratom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

delete these files:

  • gradlew
  • tools/configure_branch_protection.sh

@iAmVishal16

Copy link
Copy Markdown
Collaborator Author

delete these files:

  • gradlew
  • tools/configure_branch_protection.sh

Why these files are required:

  1. gradlew (Gradle Wrapper)
    What changed: Only a permission change (from 644 to 755 - making it executable)
    Why it's needed:
    The CI/CD workflows run ./gradlew assembleRelease to build the APK
    Without execute permissions, the GitHub Actions runner can't execute the script
    This is a standard requirement for Gradle wrapper scripts in CI/CD pipelines
    The workflow includes chmod +x gradlew as a safety step, but having it committed with the correct permissions is best practice

  2. tools/configure_branch_protection.sh
    What it does: Helper script to configure branch protection rules via GitHub CLI
    Why it's needed:
    Automates setting up branch protection for the main branch
    Can be re-run to update protection settings
    Documents the exact protection rules applied
    Useful for team members who need to configure protection on forks or new repositories
    The script was already fixed to use the correct check name: "Build APK / Assemble Release APK"

delete these files:

  • gradlew
  • tools/configure_branch_protection.sh

Why these files are required:

  1. gradlew (Gradle Wrapper)
    What changed: Only a permission change (from 644 to 755 - making it executable)
    Why it's needed:
    The CI/CD workflows run ./gradlew assembleRelease to build the APK
    Without execute permissions, the GitHub Actions runner can't execute the script
    This is a standard requirement for Gradle wrapper scripts in CI/CD pipelines
    The workflow includes chmod +x gradlew as a safety step, but having it committed with the correct permissions is best practice

  2. tools/configure_branch_protection.sh
    What it does: Helper script to configure branch protection rules via GitHub CLI
    Why it's needed:
    Automates setting up branch protection for the main branch
    Can be re-run to update protection settings
    Documents the exact protection rules applied
    Useful for team members who need to configure protection on forks or new repositories
    The script was already fixed to use the correct check name: "Build APK / Assemble Release APK"

- Remove script as branch protection can be configured manually via GitHub UI
- Update docs to use correct status check name: 'Build APK / Assemble Release APK'
- Simplify branch protection setup instructions
- Change platforms;android-36 to platforms;android-35 in both workflows
- API 36 is not available in GitHub Actions Android SDK setup
- API 35 (Android 15) is the latest stable version available
- Add step to install platforms;android-36 after Android SDK setup
- API 36 (Android 16) is released but not included in setup-android action by default
- Use sdkmanager to install API 36 platform package manually
- Handle different sdkmanager path locations for compatibility
- Remove cmdline-tools;latest from packages (setup-android action handles it automatically)
- Improve API 36 installation with better sdkmanager path detection
- Add error handling and debug output for sdkmanager location
- Fixes 'Failed to find package' error in GitHub Actions
- Remove packages parameter from setup-android action
- Install packages separately using sdkmanager (as per Stack Overflow solution)
- Accept licenses before installing packages
- Install platform-tools, platforms, and build-tools in separate commands
- Fixes 'Failed to find package' error by avoiding package concatenation issues
- Add push trigger for main branch to Release workflow
- Automatically upload to internal track on every merge to main
- Use commit SHA for release naming on main branch pushes
- Manual dispatch and tag pushes still work for production releases
- GitHub Releases only created for tags (not main branch pushes)
- Remove if conditions that check secrets (not allowed in GitHub Actions)
- Add continue-on-error to signing and Play Console upload steps
- Steps will gracefully skip if secrets are not configured
- Fixes 'Unrecognized named-value: secrets' validation errors
- Build bundleRelease instead of assembleRelease
- Collect app/build/outputs/bundle/release/*.aab as artifact
- Upload bundle to Google Play Console instead of APK
- Track bundle path with RELEASE_BUNDLE_PATH env
- Change signing step to sign AAB files instead of APK
- Use jarsigner (required for AAB) instead of apksigner
- Sign with SHA256withRSA algorithm
- Verify signature after signing
- Fixes 'All uploaded bundles must be signed' error
- Query Google Play API to get latest version code across all tracks
- Automatically increment version code and update build.gradle.kts
- Fallback to local increment if API call fails
- Prevents 'Version code already used' errors
- Use tracks().list() to query all tracks at once (more efficient)
- Add fallback to query individual tracks if list fails
- Better error handling and logging with traceback
- Cleaner code structure with separate functions
- More detailed output for debugging
- Add sys import
- Replace exit 1 with sys.exit(1) in Python script
- Fixes SyntaxError: invalid syntax
- Revert to only trigger on main branch pushes
- Testing complete, removing temporary branch trigger
Comment thread .github/workflows/release-apk.yml Outdated
Comment thread .github/workflows/release-apk.yml Outdated
- Move version code increment logic to scripts/increment_version_code.py
- Update workflow to call the script instead of embedding Python code
- Makes workflow YAML cleaner and easier to maintain
- Addresses PR review feedback
Comment thread .github/workflows/release-apk.yml Outdated
Comment thread .github/workflows/release-apk.yml
- Remove continue-on-error from keystore decode and signing steps
- Add validation to check all signing secrets are present
- Fail with clear error messages if secrets are missing
- Verify keystore file exists and is valid after decoding
- Verify signature after signing
- Addresses PR review feedback about continue-on-error implications
@justanotheratom
justanotheratom merged commit da3975f into main Nov 13, 2025
1 check passed
@justanotheratom
justanotheratom deleted the ci-cd-setup branch November 13, 2025 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants