-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build workflow for GitHub Actions
Include Git hash in debug version name and detailed APK file name
- Loading branch information
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "Auto Build" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "app/**" | ||
- "build.gradle.kts" | ||
- "gradle.properties" | ||
- "settings.gradle.kts" | ||
- "!**/.gitignore" | ||
- "!app/src/*[Tt]est/**" | ||
|
||
jobs: | ||
build: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build Debug APK | ||
id: build-debug | ||
run: ./gradlew assembleDebug | ||
|
||
- name: Automatic Releases | ||
uses: marvinpinto/action-automatic-releases@latest | ||
if: ${{ steps.build-debug.outcome == 'success' }} | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "Auto build [debug]" | ||
files: 'app/build/outputs/apk/**/*.apk' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters