This repository was archived by the owner on Sep 15, 2026. It is now read-only.
Repository navigation
Update README.md #120
This file contains hidden or 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
| name: Build devicekit.dex | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - "*.*.*" | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| lint-and-detekt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 22 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '22' | |
| distribution: 'temurin' | |
| - name: Make gradlew executable | |
| run: chmod +x gradlew | |
| - name: Run Android Lint | |
| run: | | |
| ./gradlew lint | |
| if [ -f app/build/reports/lint-results-debug.txt ]; then | |
| cat app/build/reports/lint-results-debug.txt | |
| fi | |
| - name: Run Detekt | |
| run: ./gradlew detekt --console=plain | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-detekt | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 22 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '22' | |
| distribution: 'temurin' | |
| - name: Build with Gradle | |
| run: | | |
| mkdir dist | |
| chmod +x gradlew | |
| VERSION_ARG="" | |
| if [ "${{ github.ref_type }}" = "tag" ]; then | |
| VERSION_ARG="-PversionName=${{ github.ref_name }}" | |
| fi | |
| ./gradlew assembleDebug $VERSION_ARG | |
| # The tools run via `app_process` from a single classes.dex, so publish | |
| # that dex rather than the full APK. -j drops the archive path. | |
| unzip -o -j app/build/outputs/apk/debug/app-debug.apk classes.dex -d dist | |
| mv dist/classes.dex dist/devicekit.dex | |
| cp app/build/outputs/apk/debug/app-debug.apk dist/devicekit.apk | |
| - name: Upload dex artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: devicekit-dex | |
| path: dist/devicekit.dex | |
| retention-days: 1 | |
| - name: Upload to GitHub Release | |
| if: github.ref_type == 'tag' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Version ${{ github.ref_name }} | |
| files: | | |
| dist/devicekit.dex | |
| dist/devicekit.apk | |