1.12.2-voyager-test #18
Workflow file for this run
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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Build for Android | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 18 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '18' | |
- name: Get Latest Release | |
id: release | |
uses: InsonusK/get-latest-release@v1.1.0 | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
view_top: 1 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
${{ github.workspace }}/lemmyredirect/build | |
${{ github.workspace }}/mastodonredirect/build | |
${{ github.workspace }}/peertuberedirect/build | |
${{ github.workspace }}/shared/build | |
key: ${{ runner.os }}-gradle-android-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-android- | |
- name: Build Lemmy Redirect | |
run: | | |
./gradlew :lemmyredirect:packageRelease | |
./gradlew --stop | |
- name: Build Mastodon Redirect | |
run: | | |
./gradlew :mastodonredirect:packageRelease | |
./gradlew --stop | |
- name: Build PeerTube Redirect | |
run: | | |
./gradlew :peertuberedirect:packageRelease | |
./gradlew --stop | |
- name: Upload Lemmy Redirect Logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lemmyredirect_logs | |
path: ${{ github.workspace }}/lemmydirect/build/outputs/logs/ | |
- name: Upload Mastodon Redirect Logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mastodonredirect_logs | |
path: ${{ github.workspace }}/mastodonredirect/build/outputs/logs/ | |
- name: Upload PeerTube Redirect Logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: peertuberedirect_logs | |
path: ${{ github.workspace }}/peertuberedirect/build/outputs/logs/ | |
- name: Check Lemmy Redirect Exists | |
run: ls -laR ${{ github.workspace }}/lemmyredirect/build/outputs/apk/ | |
- name: Check Mastodon Redirect Exists | |
run: ls -laR ${{ github.workspace }}/mastodonredirect/build/outputs/apk/ | |
- name: Check PeerTube Redirect Exists | |
run: ls -laR ${{ github.workspace }}/peertuberedirect/build/outputs/apk/ | |
- name: Sign Lemmy Redirect | |
id: sign_lemmy_redirect | |
uses: zacharee/zipalign-sign-android-release@1.1.3 | |
with: | |
releaseDirectory: lemmyredirect/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} | |
alias: ${{ secrets.ANDROID_SIGNING_KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.ANDROID_SIGNING_KEY_PWD }} | |
keyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PWD }} | |
- name: Sign Mastodon Redirect | |
id: sign_mastodon_redirect | |
uses: zacharee/zipalign-sign-android-release@1.1.3 | |
with: | |
releaseDirectory: mastodonredirect/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} | |
alias: ${{ secrets.ANDROID_SIGNING_KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.ANDROID_SIGNING_KEY_PWD }} | |
keyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PWD }} | |
- name: Sign PeerTube Redirect | |
id: sign_peertube_redirect | |
uses: zacharee/zipalign-sign-android-release@1.1.3 | |
with: | |
releaseDirectory: peertuberedirect/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} | |
alias: ${{ secrets.ANDROID_SIGNING_KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.ANDROID_SIGNING_KEY_PWD }} | |
keyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PWD }} | |
- name: Upload Lemmy Redirect | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Lemmy Redirect | |
path: ${{ steps.sign_lemmy_redirect.outputs.signedReleaseFile }} | |
- name: Upload Mastodon Redirect | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Mastodon Redirect | |
path: ${{ steps.sign_mastodon_redirect.outputs.signedReleaseFile }} | |
- name: Upload PeerTube Redirect | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: PeerTube Redirect | |
path: ${{ steps.sign_peertube_redirect.outputs.signedReleaseFile }} | |
- name: Add Lemmy Redirect to Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ${{ github.workspace }}/${{ steps.sign_lemmy_redirect.outputs.signedReleaseFile }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
replacesArtifacts: false | |
omitBodyDuringUpdate: true | |
tag: ${{ steps.release.outputs.tag_name }} | |
- name: Add Mastodon Redirect to Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ${{ github.workspace }}/${{ steps.sign_mastodon_redirect.outputs.signedReleaseFile }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
replacesArtifacts: false | |
omitBodyDuringUpdate: true | |
tag: ${{ steps.release.outputs.tag_name }} | |
- name: Add PeerTube Redirect to Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ${{ github.workspace }}/${{ steps.sign_peertube_redirect.outputs.signedReleaseFile }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
replacesArtifacts: false | |
omitBodyDuringUpdate: true | |
tag: ${{ steps.release.outputs.tag_name }} |