Continuous Integration
SongSync uses GitHub Actions for its Continuous Integration (CI) process. This ensures that every change to the codebase is automatically built and tested, maintaining code quality and stability.
The CI workflow is defined in the .github/workflows/ci.yml file.
Workflow Triggers
The CI pipeline is automatically triggered on the following events:
- Push: Any push to any branch in the repository.
- Pull Request: Any pull request targeting any branch.
- Workflow Dispatch: The workflow can also be run manually from the GitHub Actions tab.
Jobs
The workflow consists of two main jobs:
1. Build Debug APK (build-debug)
This job runs for every trigger event (push, pull request, etc.). Its purpose is to ensure the app compiles and builds correctly.
- Steps:
- Checkout Code: Clones the repository code.
- Set up JDK: Configures the environment to use Java Development Kit (JDK) version 17.
-
Build Debug APK: Runs the Gradle command to build the debug version of the application.
./gradlew assembleDebug -
Upload Artifact: The resulting
app-debug.apkis uploaded as a build artifact. This allows developers and testers to easily download and install a specific version for testing without needing to build it locally.
2. Build Signed Release APK (build-release)
This job is more restrictive and runs only on a push event. It is designed to create an official, signed release build.
- Environment: This job requires several GitHub Secrets to be configured in the repository settings. These secrets contain the sensitive information needed to sign the Android app package:
RELEASE_KEYSTORE_PASSWORD: Password for the keystore file.RELEASE_KEYSTORE_ALIAS: Alias of the key within the keystore.RELEASE_KEY_PASSWORD: Password for the specific key.KEYSTORE_BASE_64: The keystore file itself, encoded in Base64.- Steps:
- Checkout & JDK Setup: Same as the debug job.
- Set up Signing Key: Decodes the
KEYSTORE_BASE_64secret back into arelease.keystorefile, making it available to the build environment. -
Build Release APK: Runs the Gradle command to build the signed release version.
./gradlew assembleRelease -
Upload Artifact: The final
app-release.apkis uploaded as a build artifact, ready for distribution or publishing.