Skip to content

Commit

Permalink
Simplified Android release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tombertoli committed Sep 13, 2024
1 parent 43562f0 commit 953b052
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/ci_android_release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Android Release

on:
release:
types: [published]
workflow_dispatch:

jobs:
build-aar:
Expand All @@ -11,39 +10,33 @@ jobs:
steps:
- name: Clone repository
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: Build SimpleBLE-bridge AAR
working-directory: ./simpleble/src/backends/android/simpleble-bridge
run: |
./gradlew --no-daemon assembleRelease
mv ./build/outputs/aar/simpleble-bridge-release.aar ../../../../../simpleble-bridge.aar
- name: Upload SimpleBLE-bridge AAR
uses: actions/upload-artifact@v4
with:
name: simpleble-bridge.aar
path: ./simpleble-bridge.aar

- name: Build SimpleDroidBLE AAR
- name: Build simpleble-bridge & simpledroidble AARs
working-directory: ./simpledroidble
run: |
./gradlew --no-daemon simpledroidble:assembleRelease
mv ./simpledroidble/build/outputs/aar/simpledroidble-release.aar ../simpledroidble.aar
- name: Upload SimpleDroidBLE AAR
./gradlew simpleble-bridge:bundleReleaseAar \
simpledroidble:bundleReleaseAar \
--no-daemon \
-PbuildDir="${{ github.workspace }}"
- name: Upload simpleble-bridge & simpledroidble AARs to job
uses: actions/upload-artifact@v4
with:
name: simpledroidble.aar
path: ./simpledroidble.aar
name: simpleble-android-release
path: outputs/aar/*.aar

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: ./*.aar
file: outputs/aar/*.aar
overwrite: true
file_glob: true
file_glob: true

0 comments on commit 953b052

Please sign in to comment.