Skip to content

Commit 95acefb

Browse files
authored
ci: Add Android CI workflow with Gradle build
Sets up GitHub Actions to build the Android project on push and pull request to the main branch. Includes JDK 21 setup and API key handling via secrets.
1 parent 2ed0e0f commit 95acefb

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/android.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Android CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: set up JDK 21
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '21'
20+
distribution: 'temurin'
21+
cache: gradle
22+
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
26+
- name: Create local.properties with API keys
27+
run: |
28+
echo "OPEN_WEATHER_API_KEY=${{ secrets.OPEN_WEATHER_API_KEY }}" > ./local.properties
29+
echo "GEOAPIFY_API_KEY=${{ secrets.GEOAPIFY_API_KEY }}" >> ./local.properties
30+
31+
- name: Build with Gradle
32+
run: ./gradlew build

0 commit comments

Comments
 (0)