Attempt to optimize just a bit more #3614
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
name: TagMo CI | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- '**/README.md' | |
- '.github/ISSUE_TEMPLATE/**' | |
- 'assets/**' | |
permissions: | |
contents: write | |
jobs: | |
wearos: | |
if: ${{ github.repository == 'HiddenRamblings/TagMo' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: HiddenRamblings/TagMo | |
submodules: recursive | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Retrieve commit identification | |
run: | | |
GIT_BRANCH=$(git name-rev --name-only HEAD) | |
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV | |
GIT_HASH=$(git rev-parse --short HEAD) | |
echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV | |
APK_LINK="https://github.com/HiddenRamblings/TagMo/releases/download/master/TagMo-${GIT_HASH}-github-release-signed.apk" | |
echo "APK_LINK=${APK_LINK}" >> $GITHUB_ENV | |
- uses: burrunan/gradle-cache-action@v1 | |
name: Build WearOS Gradle | |
with: | |
job-id: TagMo-WearOS | |
# Specifies arguments for Gradle execution | |
arguments: | | |
--configure-on-demand | |
assembleGithubWearos | |
# Gradle version to use for execution: | |
# wrapper (default), current, rc, nightly, release-nightly, or | |
# versions like 6.6 (see https://services.gradle.org/versions/all) | |
gradle-version: wrapper | |
# Properties are passed as -Pname=value | |
properties: | | |
org.gradle.unsafe.configuration-cache=true | |
- uses: r0adkll/sign-android-release@v1 | |
name: Sign WearOS APK | |
# ID used to access action output | |
id: sign_wear | |
with: | |
releaseDirectory: app/build/outputs/apk/github/wearos | |
signingKeyBase64: "MIIJcQIBAzCCCSoGCSqGSIb3DQEHAaCCCRsEggkXMIIJEzCCBWcGCSqGSIb3DQEHAa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enramblings" | |
env: | |
# override default build-tools version (29.0.3) -- optional | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: TagMo-${{ env.GIT_HASH }}-WearOS | |
path: | | |
${{steps.sign_wear.outputs.signedReleaseFile}} | |
- uses: 8bitDream/action-github-releases@v1.0.0 | |
if: github.event_name != 'pull_request' | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: wearos | |
prerelease: true | |
title: TagMo-${{ env.GIT_HASH }}-WearOS | |
files: | | |
${{steps.sign_wear.outputs.signedReleaseFile}} | |
android: | |
needs: wearos | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: HiddenRamblings/TagMo | |
submodules: recursive | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Retrieve commit identification | |
run: | | |
GIT_BRANCH=$(git name-rev --name-only HEAD) | |
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV | |
GIT_HASH=$(git rev-parse --short HEAD) | |
echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV | |
- uses: burrunan/gradle-cache-action@v1 | |
name: Build Release Gradle | |
with: | |
job-id: TagMo | |
# Specifies arguments for Gradle execution | |
arguments: | | |
--configure-on-demand | |
assembleGithubRelease | |
# Gradle version to use for execution: | |
# wrapper (default), current, rc, nightly, release-nightly, or | |
# versions like 6.6 (see https://services.gradle.org/versions/all) | |
gradle-version: wrapper | |
# Properties are passed as -Pname=value | |
properties: | | |
org.gradle.unsafe.configuration-cache=true | |
- uses: r0adkll/sign-android-release@v1 | |
name: Sign Release APK | |
# ID used to access action output | |
id: sign_main | |
with: | |
releaseDirectory: app/build/outputs/apk/github/release | |
signingKeyBase64: "MIIJcQIBAzCCCSoGCSqGSIb3DQEHAaCCCRsEggkXMIIJEzCCBWcGCSqGSIb3DQEHAaCCBVgEggV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env: | |
# override default build-tools version (29.0.3) -- optional | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: TagMo-${{ env.GIT_HASH }} | |
retention-days: 1 | |
path: | | |
${{steps.sign_main.outputs.signedReleaseFile}} | |
- uses: 8bitDream/action-github-releases@v1.0.0 | |
if: github.event_name != 'pull_request' | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: ${{ env.GIT_BRANCH }} | |
prerelease: ${{ env.GIT_BRANCH != 'master' }} | |
title: TagMo-${{ env.GIT_HASH }} | |
files: | | |
${{steps.sign_main.outputs.signedReleaseFile}} | |
- name: Purge cache | |
if: ${{ ! startsWith(github.event.head_commit.message, 'Update ') }} | |
continue-on-error: true | |
uses: MyAlbum/purge-cache@v1 | |
with: | |
max-age: 172800 # 2 days, default: 7 days since last use |