Skip to content

Commit

Permalink
Create an action used to create a GitHub release with the latest APK
Browse files Browse the repository at this point in the history
  • Loading branch information
etonotieno committed Jan 11, 2025
1 parent 8ceb3d3 commit 93bca39
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Create a GitHub Release

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }} - ${{ github.ref }}
cancel-in-progress: true

jobs:
android-release:
if: github.repository == 'etonotieno/GoCart'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build app
run: ./gradlew :android:assembleRelease

- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: android-app
if-no-files-found: ignore
path: android/build/outputs/apk/release/*.apk

- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
android/build/outputs/apk/release/*.apk
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}


0 comments on commit 93bca39

Please sign in to comment.