Skip to content

Cooldown Feature for digital addictions #750

Cooldown Feature for digital addictions

Cooldown Feature for digital addictions #750

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
~/.gradle/daemon
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle.kts', '**/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Grant execute permission
run: chmod +x gradlew
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.5'
cache: true
- name: Install gomobile
run: |
go install github.com/sagernet/gomobile/cmd/gomobile@v0.1.12
export PATH="$HOME/go/bin:$PATH"
gomobile init
- name: Add gomobile to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Build Go Tunnel (tunnel.aar)
run: ./gradlew buildGoTunnel
- name: Lint
run: ./gradlew lint
- name: Build debug APK
run: ./gradlew assembleDebug
- name: Upload arm64-v8a APK
uses: actions/upload-artifact@v4
with:
name: BlockAds-arm64-v8a-debug
path: app/build/outputs/apk/debug/*arm64-v8a*.apk
retention-days: 7
- name: Upload armeabi-v7a APK
uses: actions/upload-artifact@v4
with:
name: BlockAds-armeabi-v7a-debug
path: app/build/outputs/apk/debug/*armeabi-v7a*.apk
retention-days: 7
- name: Upload x86_64 APK
uses: actions/upload-artifact@v4
with:
name: BlockAds-x86_64-debug
path: app/build/outputs/apk/debug/*x86_64*.apk
retention-days: 7
- name: Upload Universal APK
uses: actions/upload-artifact@v4
with:
name: BlockAds-universal-debug
path: app/build/outputs/apk/debug/*universal*.apk
retention-days: 7