Skip to content

add debug info and stacktrace to gradle builds for troubleshooting #8

add debug info and stacktrace to gradle builds for troubleshooting

add debug info and stacktrace to gradle builds for troubleshooting #8

Workflow file for this run

name: Build and Release APK
on:
push:
tags:
- 'v*' # Triggers on version tags like v1.0, v1.1, etc.
workflow_dispatch: # Allows manual trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Accept Android SDK licenses
run: yes | sdkmanager --licenses || true
- name: Verify Java installation
run: |
java -version
echo "JAVA_HOME: $JAVA_HOME"
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Debug Java and Gradle setup
run: |
echo "=== Java Information ==="
java -version
echo "JAVA_HOME: $JAVA_HOME"
echo "PATH: $PATH"
echo "=== Gradle Information ==="
./gradlew --version
echo "=== System Information ==="
uname -a
- name: Build Debug APK
run: ./gradlew assembleDebug --no-daemon --stacktrace --info
- name: Build Release APK
run: ./gradlew assembleRelease --no-daemon --stacktrace --info
- name: Get version name
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Rename APKs
run: |
cp app/build/outputs/apk/debug/app-debug.apk notodata-debug-v${{ steps.version.outputs.version }}.apk
cp app/build/outputs/apk/release/app-release-unsigned.apk notodata-release-v${{ steps.version.outputs.version }}.apk
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
notodata-debug-v${{ steps.version.outputs.version }}.apk
notodata-release-v${{ steps.version.outputs.version }}.apk
body: |
## notodata v${{ steps.version.outputs.version }}
### installation instructions
1. **download apk**: download `notodata-release-v${{ steps.version.outputs.version }}.apk` below
2. **enable unknown sources**: go to settings → security → install unknown apps → enable for your browser
3. **install**: open the apk file and follow the prompts
4. **grant permissions**: allow notification access when prompted
### what's new
see [changelog.md](https://github.com/${{ github.repository }}/blob/main/changelog.md) for detailed changes.
### file downloads
- **`notodata-release-v${{ steps.version.outputs.version }}.apk`** - recommended for general use
- **`notodata-debug-v${{ steps.version.outputs.version }}.apk`** - debug version with extra logging
### issues?
report bugs or ask questions in the [issues](https://github.com/${{ github.repository }}/issues) section.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}