Skip to content

Commit

Permalink
Merge pull request #6 from tim0-12432/improvements
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
tim0-12432 authored Aug 6, 2022
2 parents a9562ce + 2fc8534 commit 92e0293
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ jobs:
java-version: 11
distribution: adopt-hotspot
cache: gradle
- id: app-version
run: echo "::set-output name=version::$(./gradlew -q printVersion)"
- id: appVersion
run: echo "::set-output name=VERSION::$(./gradlew -q printVersion)"
- name: Build APK
id: buildApk
run: ./gradlew assembleRelease --stacktrace
Expand All @@ -110,7 +110,7 @@ jobs:
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-${{ steps.app-version.outputs.version }}
name: app-${{ steps.appVersion.outputs.version }}
path: |
./app/build/outputs/apk/release/**.apk
./app/release/**.apk
20 changes: 8 additions & 12 deletions .github/workflows/release_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ jobs:
- name: Cache APK
uses: actions/cache@v3
with:
path: |
- ./app/release/*.apk
- ./app/build/outputs/apk/release/*.apk
path: ./app/build/outputs/apk/release/app*.apk
key: ${{ runner.os }}-apk-${{ hashFiles('**/*gradle*') }}
restore-keys: |
- ${{ runner.os }}-apk-
Expand All @@ -147,22 +145,20 @@ jobs:
env:
VERSION_SUFFIX: RELEASE
steps:
- id: app-version
run: echo "::set-output name=version::$(./gradlew -q printVersion)"
- id: appVersion
run: echo "::set-output name=VERSION::$(./gradlew -q printVersion)"
- name: Use cached APK
uses: actions/cache@v3
with:
path: |
- ./app/release/*.apk
- ./app/build/outputs/apk/release/*.apk
path: ./app/build/outputs/apk/release/app*.apk
key: ${{ runner.os }}-apk-${{ hashFiles('**/*gradle*') }}
restore-keys: |
- ${{ runner.os }}-apk-
- name: Create release
uses: avakar/tag-and-release@v1
with:
tag_name: v${{ steps.app-version.outputs.version }}
release_name: v${{ steps.app-version.outputs.version }}
tag_name: v${{ steps.appVersion.outputs.version }}
release_name: v${{ steps.appVersion.outputs.version }}
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -171,7 +167,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_path: ./app/release/*.apk
asset_name: f1scheduleapp-v${{ steps.app-version.outputs.version }}.apk
asset_path: ./app/build/outputs/apk/release/app*.apk
asset_name: f1scheduleappV${{ steps.appVersion.outputs.version }}.apk
asset_content_type: application/apk
upload_url: ${{ steps.release.outputs.upload_url }}

0 comments on commit 92e0293

Please sign in to comment.