Skip to content

Commit

Permalink
Merge pull request #403 from nielsvanvelzen/build-cache
Browse files Browse the repository at this point in the history
Add Gradle cache to app-build workflow
  • Loading branch information
Maxr1998 authored May 24, 2021
2 parents ed12c2e + 7b15c91 commit bd53cd7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/app-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,27 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11

- name: Setup Gradle cache
uses: actions/cache@v2.1.5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Assemble debug APKs
run: ./gradlew --no-daemon --info assembleDebug

- name: Split APK release types
run: |
mkdir -p build/jellyfin-publish/release-libre build/jellyfin-publish/release-proprietary;
mv app/build/outputs/apk/*/*/jellyfin-android-*-libre-debug.apk build/jellyfin-publish/release-libre/;
mv app/build/outputs/apk/*/*/jellyfin-android-*-proprietary-debug.apk build/jellyfin-publish/release-proprietary/;
- uses: actions/upload-artifact@v2
with:
name: build-artifacts
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/app-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,26 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11

- name: Set JELLYFIN_VERSION
run: echo "JELLYFIN_VERSION=$(echo ${GITHUB_REF#refs/tags/v} | tr / -)" >> $GITHUB_ENV

- name: Assemble release APKs
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew --no-daemon --info assembleRelease versionTxt

- name: Split APK release types
run: |
mkdir -p build/jellyfin-publish/release-libre build/jellyfin-publish/release-proprietary;
mv app/build/outputs/apk/*/*/jellyfin-android-*-libre-release.apk build/jellyfin-publish/release-libre/;
mv app/build/outputs/apk/*/*/jellyfin-android-*-proprietary-release.apk build/jellyfin-publish/release-proprietary/;
mv app/build/version.txt build/jellyfin-publish/;
- name: Upload release artifacts
uses: alexellis/upload-assets@0.3.0
env:
Expand All @@ -46,7 +41,6 @@ jobs:
["build/jellyfin-publish/release-libre/*",
"build/jellyfin-publish/release-proprietary/*",
"build/jellyfin-publish/version.txt"]
- name: Upload to repo.jellyfin.org
uses: burnett01/rsync-deployments@4.1
with:
Expand All @@ -56,7 +50,6 @@ jobs:
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}

- name: Update repo.jellyfin.org symlinks
uses: appleboy/ssh-action@v0.1.4
with:
Expand Down

0 comments on commit bd53cd7

Please sign in to comment.