Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rivasjm committed Aug 22, 2024
1 parent 6e338b3 commit c5c7183
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and Release APK

on:
push:
branches:
- release

jobs:
build:
name: Build APK
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'

- name: Gradle cache
uses: gradle/gradle-build-action@v2

- name: Make gradlew executable
working-directory: ./AndroidProject
run: chmod +x ./gradlew

- name: Build APK
run: ./gradlew assembleDebug

- name: Upload APK as artifact
uses: actions/upload-artifact@v3
with:
name: app-debug-apk
path: app/build/outputs/apk/debug/app-debug.apk

release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build

steps:
- name: Download APK artifact
uses: actions/download-artifact@v3
with:
name: app-debug-apk
path: .

- name: Create a new release
uses: softprops/action-gh-release@v1
with:
files: app-debug.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
android-unit-tests:
runs-on: ubuntu-latest
steps:
- name: checkout
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
Expand Down

0 comments on commit c5c7183

Please sign in to comment.