Skip to content

Commit

Permalink
Update android.yml
Browse files Browse the repository at this point in the history
Adding releases
  • Loading branch information
Kranium2002 authored Sep 10, 2023
1 parent 664283e commit e44c330
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,44 @@ jobs:
- name: Make Gradle executable
run: |
icacls gradlew /grant Everyone:RX
- name: Build with Gradle
run: |
.\gradlew assembleDebug lintVitalRelease
- name: Upload artifact
- name: Upload APK as artifact
uses: actions/upload-artifact@v3
with:
name: app-debug.apk
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 100
path: app/build/outputs/apk/debug/lunges.apk
retention-days: 10

create_release:

runs-on: ubuntu-latest

needs: build

steps:
- name: Create GitHub release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
app/build/outputs/apk/debug/lunges.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get the release ID
id: get_release_id
run: echo "RELEASE_ID=${{ steps.create_release.outputs.id }}" >> $GITHUB_ENV

- name: Upload APK to the release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/debug/lunges.apk
asset_name: lunges.apk
asset_content_type: application/vnd.android.package-archive
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}

0 comments on commit e44c330

Please sign in to comment.