-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create an action used to create a GitHub release with the latest APK
- Loading branch information
1 parent
8ceb3d3
commit 93bca39
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
||
|