Reduce recompositions caused by media selector updates, fix #1639 #338
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 file was generated using Kotlin DSL (.github/workflows/src.main.kts). | |
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. | |
# Generated with https://github.com/typesafegithub/github-workflows-kt | |
name: 'Release' | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
actions: 'write' | |
contents: 'write' | |
jobs: | |
consistency-check: | |
name: 'Workflow YAML Consistency Check' | |
runs-on: 'ubuntu-latest' | |
permissions: {} | |
steps: | |
- id: 'step-0' | |
uses: 'actions/checkout@v4' | |
- id: 'step-1' | |
run: 'pip3 install PyYAML' | |
- id: 'step-2' | |
run: 'cp ".github/workflows/release.yml" ".github/workflows/release.yml-check.yml" ' | |
- id: 'step-3' | |
run: '.github/workflows/src.main.kts' | |
- id: 'step-4' | |
run: 'python .github/workflows/check_yaml_equivalence.py .github/workflows/release.yml .github/workflows/release.yml-check.yml' | |
create-release: | |
name: 'Create Release' | |
runs-on: 'ubuntu-latest' | |
outputs: | |
uploadUrl: '${{ steps.step-4.outputs.upload_url }}' | |
id: '${{ steps.step-4.outputs.id }}' | |
steps: | |
- id: 'step-0' | |
uses: 'actions/checkout@v4' | |
- id: 'step-1' | |
name: 'Get Tag' | |
uses: 'dawidd6/action-get-tag@v1' | |
- id: 'step-2' | |
uses: 'bhowell2/[email protected]' | |
with: | |
value: '${{ steps.step-1.outputs.tag }}' | |
index_of_str: 'v' | |
default_return_value: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-3' | |
name: 'Generate Release Notes' | |
run: |- | |
# Specify the file path | |
FILE_PATH="ci-helper/release-template.md" | |
# Read the file content | |
file_content=$(cat "$FILE_PATH") | |
modified_content="$file_content" | |
# Replace 'string_to_find' with 'string_to_replace_with' in the content | |
modified_content="${modified_content//\$GIT_TAG/${{ steps.step-1.outputs.tag }}}" | |
modified_content="${modified_content//\$TAG_VERSION/${{ steps.step-2.outputs.substring }}}" | |
# Output the result as a step output | |
echo "result<<EOF" >> $GITHUB_OUTPUT | |
echo "$modified_content" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- id: 'step-4' | |
name: 'Create Release' | |
uses: 'softprops/action-gh-release@v1' | |
with: | |
body: '${{ steps.step-3.outputs.result }}' | |
name: '${{ steps.step-2.outputs.substring }}' | |
tag_name: '${{ steps.step-1.outputs.tag }}' | |
draft: 'true' | |
prerelease: '${{ contains(steps.step-1.outputs.tag, ''-'') }}' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
release_self-hosted-windows-10: | |
name: 'Windows 10 x86_64 (Self-Hosted)' | |
runs-on: | |
- 'self-hosted' | |
- 'Windows' | |
- 'X64' | |
needs: | |
- 'create-release' | |
if: '${{ github.repository == ''open-ani/animeko'' }}' | |
steps: | |
- id: 'step-0' | |
uses: 'actions/checkout@v4' | |
with: | |
submodules: 'recursive' | |
- id: 'step-1' | |
name: 'Get Tag' | |
uses: 'dawidd6/action-get-tag@v1' | |
- id: 'step-2' | |
uses: 'bhowell2/[email protected]' | |
with: | |
value: '${{ steps.step-1.outputs.tag }}' | |
index_of_str: 'v' | |
default_return_value: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-3' | |
continue-on-error: true | |
run: 'rm local.properties' | |
- id: 'step-4' | |
name: 'Get JBR (Windows)' | |
env: | |
RUNNER_TOOL_CACHE: '${{ runner.tool_cache }}' | |
JBR_URL: 'https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-windows-x64-b750.29.tar.gz' | |
JBR_CHECKSUM_URL: 'https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-windows-x64-b750.29.tar.gz.checksum' | |
shell: 'cmd' | |
run: 'python .github/workflows/download_jbr.py' | |
- id: 'step-5' | |
name: 'Setup JBR 21 for Windows' | |
uses: 'gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d' | |
with: | |
java-version: '21' | |
distribution: 'jdkfile' | |
jdkFile: '${{ steps.step-4.outputs.jbrLocation }}' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
- id: 'step-6' | |
name: 'Dump Local Properties' | |
run: 'echo "jvm.toolchain.version=21" >> local.properties' | |
- id: 'step-7' | |
name: 'Setup Gradle' | |
uses: 'gradle/actions/setup-gradle@v3' | |
with: | |
cache-disabled: 'true' | |
- id: 'step-8' | |
name: 'Clean and download dependencies' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '60' | |
max_attempts: '3' | |
command: './gradlew "--stacktrace" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
- id: 'step-9' | |
name: 'Update Release Version Name' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew updateReleaseVersionNameFromGit "--no-configuration-cache" "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}' | |
CI_RELEASE_ID: '${{ needs.create-release.outputs.id }}' | |
CI_TAG: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-10' | |
name: 'Compile Kotlin' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '2' | |
command: './gradlew compileKotlin compileCommonMainKotlinMetadata compileJvmMainKotlinMetadata compileKotlinDesktop compileKotlinMetadata "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
- id: 'step-11' | |
name: 'Compile Kotlin Android' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '2' | |
command: './gradlew compileDebugKotlinAndroid compileReleaseKotlinAndroid "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
release_github-windows-2019: | |
name: 'Windows Server 2019 x86_64' | |
runs-on: | |
- 'windows-2019' | |
needs: | |
- 'create-release' | |
steps: | |
- id: 'step-0' | |
uses: 'actions/checkout@v4' | |
with: | |
submodules: 'recursive' | |
- id: 'step-1' | |
name: 'Get Tag' | |
uses: 'dawidd6/action-get-tag@v1' | |
- id: 'step-2' | |
uses: 'bhowell2/[email protected]' | |
with: | |
value: '${{ steps.step-1.outputs.tag }}' | |
index_of_str: 'v' | |
default_return_value: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-3' | |
continue-on-error: true | |
run: 'rm local.properties' | |
- id: 'step-4' | |
name: 'Get JBR (Windows)' | |
env: | |
RUNNER_TOOL_CACHE: '${{ runner.tool_cache }}' | |
JBR_URL: 'https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-windows-x64-b750.29.tar.gz' | |
JBR_CHECKSUM_URL: 'https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-windows-x64-b750.29.tar.gz.checksum' | |
shell: 'cmd' | |
run: 'python .github/workflows/download_jbr.py' | |
- id: 'step-5' | |
name: 'Setup JBR 21 for Windows' | |
uses: 'gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d' | |
with: | |
java-version: '21' | |
distribution: 'jdkfile' | |
jdkFile: '${{ steps.step-4.outputs.jbrLocation }}' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
- id: 'step-6' | |
name: 'Dump Local Properties' | |
run: 'echo "jvm.toolchain.version=21" >> local.properties' | |
- id: 'step-7' | |
name: 'Setup Gradle' | |
uses: 'gradle/actions/setup-gradle@v3' | |
with: | |
cache-disabled: 'true' | |
- id: 'step-8' | |
name: 'Clean and download dependencies' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '60' | |
max_attempts: '3' | |
command: './gradlew "--stacktrace" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
- id: 'step-9' | |
name: 'Update Release Version Name' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew updateReleaseVersionNameFromGit "--no-configuration-cache" "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}' | |
CI_RELEASE_ID: '${{ needs.create-release.outputs.id }}' | |
CI_TAG: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-10' | |
name: 'Compile Kotlin' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '2' | |
command: './gradlew compileKotlin compileCommonMainKotlinMetadata compileJvmMainKotlinMetadata compileKotlinDesktop compileKotlinMetadata "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
- id: 'step-11' | |
name: 'Compile Kotlin Android' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '2' | |
command: './gradlew compileDebugKotlinAndroid compileReleaseKotlinAndroid "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
- id: 'step-12' | |
name: 'Upload Desktop Installers' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew :ci-helper:uploadDesktopInstallers "--no-configuration-cache" "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=x86_64"' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}' | |
CI_RELEASE_ID: '${{ needs.create-release.outputs.id }}' | |
CI_TAG: '${{ steps.step-1.outputs.tag }}' | |
UPLOAD_TO_S3: 'true' | |
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}' | |
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}' | |
AWS_BASEURL: '${{ secrets.AWS_BASEURL }}' | |
AWS_REGION: '${{ secrets.AWS_REGION }}' | |
AWS_BUCKET: '${{ secrets.AWS_BUCKET }}' | |
- id: 'step-13' | |
name: 'Upload compose logs' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'compose-logs-github-windows-2019' | |
path: 'app/desktop/build/compose/logs' | |
if: '${{ always() }}' | |
release_github-macos-13: | |
name: 'macOS 13 x86_64 (GitHub)' | |
runs-on: | |
- 'macos-13' | |
needs: | |
- 'create-release' | |
steps: | |
- id: 'step-0' | |
uses: 'actions/checkout@v4' | |
with: | |
submodules: 'recursive' | |
- id: 'step-1' | |
name: 'Get Tag' | |
uses: 'dawidd6/action-get-tag@v1' | |
- id: 'step-2' | |
uses: 'bhowell2/[email protected]' | |
with: | |
value: '${{ steps.step-1.outputs.tag }}' | |
index_of_str: 'v' | |
default_return_value: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-3' | |
name: 'Free space for macOS' | |
continue-on-error: true | |
run: 'chmod +x ./ci-helper/free-space-macos.sh && ./ci-helper/free-space-macos.sh' | |
- id: 'step-4' | |
continue-on-error: true | |
run: 'rm local.properties' | |
- id: 'step-5' | |
name: 'Resolve JBR location' | |
shell: 'bash' | |
run: |- | |
# Expand jbrLocationExpr | |
jbr_location_expr='${{ runner.tool_cache }}/jbrsdk_jcef-21.0.5-osx-x64-b631.8.tar.gz' | |
echo "jbrLocation=$jbr_location_expr" >> $GITHUB_OUTPUT | |
- id: 'step-6' | |
name: 'Get JBR 21 for macOS AArch64' | |
env: | |
jbrLocation: '${{ steps.step-5.outputs.jbrLocation }}' | |
shell: 'bash' | |
run: |- | |
jbr_location="$jbrLocation" | |
checksum_url="https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-osx-x64-b631.8.tar.gz.checksum" | |
checksum_file="checksum.tmp" | |
wget -q -O $checksum_file $checksum_url | |
expected_checksum=$(awk '{print $1}' $checksum_file) | |
file_checksum="" | |
if [ -f "$jbr_location" ]; then | |
file_checksum=$(shasum -a 512 "$jbr_location" | awk '{print $1}') | |
fi | |
if [ "$file_checksum" != "$expected_checksum" ]; then | |
wget -q --tries=3 https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-osx-x64-b631.8.tar.gz -O "$jbr_location" | |
file_checksum=$(shasum -a 512 "$jbr_location" | awk '{print $1}') | |
fi | |
if [ "$file_checksum" != "$expected_checksum" ]; then | |
echo "Checksum verification failed!" >&2 | |
rm -f $checksum_file | |
exit 1 | |
fi | |
rm -f $checksum_file | |
file "$jbr_location" | |
- id: 'step-7' | |
name: 'Setup JBR 21 for macOS ' | |
uses: 'gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d' | |
with: | |
java-version: '21' | |
distribution: 'jdkfile' | |
jdkFile: '${{ steps.step-5.outputs.jbrLocation }}' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
- id: 'step-8' | |
name: 'Dump Local Properties' | |
run: 'echo "jvm.toolchain.version=21" >> local.properties' | |
- id: 'step-9' | |
run: 'chmod -R 777 .' | |
- id: 'step-10' | |
name: 'Setup Gradle' | |
uses: 'gradle/actions/setup-gradle@v3' | |
with: | |
cache-disabled: 'true' | |
- id: 'step-11' | |
name: 'Clean and download dependencies' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '60' | |
max_attempts: '3' | |
command: './gradlew "--stacktrace" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}"' | |
- id: 'step-12' | |
name: 'Update Release Version Name' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew updateReleaseVersionNameFromGit "--no-configuration-cache" "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}"' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}' | |
CI_RELEASE_ID: '${{ needs.create-release.outputs.id }}' | |
CI_TAG: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-13' | |
name: 'Prepare signing key' | |
continue-on-error: true | |
uses: 'timheuer/[email protected]' | |
with: | |
fileName: 'android_signing_key' | |
fileDir: './' | |
encodedString: '${{ secrets.SIGNING_RELEASE_STOREFILE }}' | |
if: '${{ (github.repository == ''open-ani/animeko'') && (!(github.event_name == ''pull_request'')) }}' | |
- id: 'step-14' | |
name: 'Compile Kotlin' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '2' | |
command: './gradlew compileKotlin compileCommonMainKotlinMetadata compileJvmMainKotlinMetadata compileKotlinDesktop compileKotlinMetadata "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}"' | |
- id: 'step-15' | |
name: 'Compile Kotlin Android' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '2' | |
command: './gradlew compileDebugKotlinAndroid compileReleaseKotlinAndroid "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}"' | |
- id: 'step-16' | |
name: 'Build Android Debug APKs' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew assembleDebug "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}"' | |
- id: 'step-17' | |
name: 'Upload Android Debug APK arm64-v8a' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'ani-android-arm64-v8a-debug' | |
path: 'app/android/build/outputs/apk/debug/android-arm64-v8a-debug.apk' | |
overwrite: 'true' | |
- id: 'step-18' | |
name: 'Upload Android Debug APK x86_64' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'ani-android-x86_64-debug' | |
path: 'app/android/build/outputs/apk/debug/android-x86_64-debug.apk' | |
overwrite: 'true' | |
- id: 'step-19' | |
name: 'Upload Android Debug APK armeabi-v7a' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'ani-android-armeabi-v7a-debug' | |
path: 'app/android/build/outputs/apk/debug/android-armeabi-v7a-debug.apk' | |
overwrite: 'true' | |
- id: 'step-20' | |
name: 'Upload Android Debug APK universal' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'ani-android-universal-debug' | |
path: 'app/android/build/outputs/apk/debug/android-universal-debug.apk' | |
overwrite: 'true' | |
- id: 'step-21' | |
name: 'Build Android Release APKs' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew assembleRelease "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}"' | |
env: | |
signing_release_storeFileFromRoot: '${{ steps.step-13.outputs.filePath }}' | |
signing_release_storePassword: '${{ secrets.SIGNING_RELEASE_STOREPASSWORD }}' | |
signing_release_keyAlias: '${{ secrets.SIGNING_RELEASE_KEYALIAS }}' | |
signing_release_keyPassword: '${{ secrets.SIGNING_RELEASE_KEYPASSWORD }}' | |
if: '${{ (github.repository == ''open-ani/animeko'') && (!(github.event_name == ''pull_request'')) }}' | |
- id: 'step-22' | |
name: 'Upload Android Release APK arm64-v8a' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'ani-android-arm64-v8a-release' | |
path: 'app/android/build/outputs/apk/release/android-arm64-v8a-release.apk' | |
overwrite: 'true' | |
- id: 'step-23' | |
name: 'Upload Android Release APK x86_64' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'ani-android-x86_64-release' | |
path: 'app/android/build/outputs/apk/release/android-x86_64-release.apk' | |
overwrite: 'true' | |
- id: 'step-24' | |
name: 'Upload Android Release APK armeabi-v7a' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'ani-android-armeabi-v7a-release' | |
path: 'app/android/build/outputs/apk/release/android-armeabi-v7a-release.apk' | |
overwrite: 'true' | |
- id: 'step-25' | |
name: 'Upload Android Release APK universal' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'ani-android-universal-release' | |
path: 'app/android/build/outputs/apk/release/android-universal-release.apk' | |
overwrite: 'true' | |
- id: 'step-26' | |
name: 'Upload Android APK for Release' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew :ci-helper:uploadAndroidApk "--no-configuration-cache" "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}"' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}' | |
CI_RELEASE_ID: '${{ needs.create-release.outputs.id }}' | |
CI_TAG: '${{ steps.step-1.outputs.tag }}' | |
UPLOAD_TO_S3: 'true' | |
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}' | |
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}' | |
AWS_BASEURL: '${{ secrets.AWS_BASEURL }}' | |
AWS_REGION: '${{ secrets.AWS_REGION }}' | |
AWS_BUCKET: '${{ secrets.AWS_BUCKET }}' | |
- id: 'step-27' | |
name: 'Generate QR code for APK (GitHub)' | |
uses: 'snow-actions/[email protected]' | |
with: | |
text: 'https://github.com/Him188/ani/releases/download/${{ steps.step-1.outputs.tag }}/ani-${{ steps.step-2.outputs.substring }}-universal.apk' | |
path: 'apk-qrcode-github.png' | |
- id: 'step-28' | |
name: 'Generate QR code for APK (Cloudflare)' | |
uses: 'snow-actions/[email protected]' | |
with: | |
text: 'https://d.myani.org/${{ steps.step-1.outputs.tag }}/ani-${{ steps.step-2.outputs.substring }}-universal.apk' | |
path: 'apk-qrcode-cloudflare.png' | |
- id: 'step-29' | |
name: 'Upload QR code' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew :ci-helper:uploadAndroidApkQR "--no-configuration-cache" "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}"' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}' | |
CI_RELEASE_ID: '${{ needs.create-release.outputs.id }}' | |
CI_TAG: '${{ steps.step-1.outputs.tag }}' | |
UPLOAD_TO_S3: 'true' | |
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}' | |
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}' | |
AWS_BASEURL: '${{ secrets.AWS_BASEURL }}' | |
AWS_REGION: '${{ secrets.AWS_REGION }}' | |
AWS_BUCKET: '${{ secrets.AWS_BUCKET }}' | |
- id: 'step-30' | |
name: 'Upload compose logs' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'compose-logs-github-macos-13' | |
path: 'app/desktop/build/compose/logs' | |
if: '${{ always() }}' | |
release_self-hosted-macos-15: | |
name: 'macOS 15 AArch64 (Self-Hosted)' | |
runs-on: | |
- 'self-hosted' | |
- 'macOS' | |
- 'ARM64' | |
needs: | |
- 'create-release' | |
if: '${{ github.repository == ''open-ani/animeko'' }}' | |
steps: | |
- id: 'step-0' | |
uses: 'actions/checkout@v4' | |
with: | |
submodules: 'recursive' | |
- id: 'step-1' | |
name: 'Get Tag' | |
uses: 'dawidd6/action-get-tag@v1' | |
- id: 'step-2' | |
uses: 'bhowell2/[email protected]' | |
with: | |
value: '${{ steps.step-1.outputs.tag }}' | |
index_of_str: 'v' | |
default_return_value: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-3' | |
continue-on-error: true | |
run: 'rm local.properties' | |
- id: 'step-4' | |
name: 'Resolve JBR location' | |
shell: 'bash' | |
run: |- | |
# Expand jbrLocationExpr | |
jbr_location_expr='${{ runner.tool_cache }}/jbrsdk_jcef-21.0.5-osx-aarch64-b631.8.tar.gz' | |
echo "jbrLocation=$jbr_location_expr" >> $GITHUB_OUTPUT | |
- id: 'step-5' | |
name: 'Get JBR 21 for macOS AArch64' | |
env: | |
jbrLocation: '${{ steps.step-4.outputs.jbrLocation }}' | |
shell: 'bash' | |
run: |- | |
jbr_location="$jbrLocation" | |
checksum_url="https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-osx-aarch64-b631.8.tar.gz.checksum" | |
checksum_file="checksum.tmp" | |
wget -q -O $checksum_file $checksum_url | |
expected_checksum=$(awk '{print $1}' $checksum_file) | |
file_checksum="" | |
if [ -f "$jbr_location" ]; then | |
file_checksum=$(shasum -a 512 "$jbr_location" | awk '{print $1}') | |
fi | |
if [ "$file_checksum" != "$expected_checksum" ]; then | |
wget -q --tries=3 https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-osx-aarch64-b631.8.tar.gz -O "$jbr_location" | |
file_checksum=$(shasum -a 512 "$jbr_location" | awk '{print $1}') | |
fi | |
if [ "$file_checksum" != "$expected_checksum" ]; then | |
echo "Checksum verification failed!" >&2 | |
rm -f $checksum_file | |
exit 1 | |
fi | |
rm -f $checksum_file | |
file "$jbr_location" | |
- id: 'step-6' | |
name: 'Setup JBR 21 for macOS ' | |
uses: 'gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d' | |
with: | |
java-version: '21' | |
distribution: 'jdkfile' | |
jdkFile: '${{ steps.step-4.outputs.jbrLocation }}' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
- id: 'step-7' | |
name: 'Dump Local Properties' | |
run: 'echo "jvm.toolchain.version=21" >> local.properties' | |
- id: 'step-8' | |
run: 'chmod -R 777 .' | |
- id: 'step-9' | |
name: 'Setup Gradle' | |
uses: 'gradle/actions/setup-gradle@v3' | |
with: | |
cache-disabled: 'true' | |
- id: 'step-10' | |
name: 'Clean and download dependencies' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '60' | |
max_attempts: '3' | |
command: './gradlew "--stacktrace" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=arm64-v8a"' | |
- id: 'step-11' | |
name: 'Update Release Version Name' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew updateReleaseVersionNameFromGit "--no-configuration-cache" "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=arm64-v8a"' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}' | |
CI_RELEASE_ID: '${{ needs.create-release.outputs.id }}' | |
CI_TAG: '${{ steps.step-1.outputs.tag }}' | |
- id: 'step-12' | |
name: 'Compile Kotlin' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '2' | |
command: './gradlew compileKotlin compileCommonMainKotlinMetadata compileJvmMainKotlinMetadata compileKotlinDesktop compileKotlinMetadata "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=arm64-v8a"' | |
- id: 'step-13' | |
name: 'Compile Kotlin Android' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '2' | |
command: './gradlew compileDebugKotlinAndroid compileReleaseKotlinAndroid "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=arm64-v8a"' | |
- id: 'step-14' | |
name: 'Upload Desktop Installers' | |
uses: 'nick-fields/retry@v3' | |
with: | |
timeout_minutes: '120' | |
max_attempts: '1' | |
command: './gradlew :ci-helper:uploadDesktopInstallers "--no-configuration-cache" "--scan" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "-Pani.dandanplay.app.id=${{ secrets.DANDANPLAY_APP_ID }}" "-Pani.dandanplay.app.secret=${{ secrets.DANDANPLAY_APP_SECRET }}" "--parallel" "-Pani.android.abis=arm64-v8a"' | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}' | |
CI_RELEASE_ID: '${{ needs.create-release.outputs.id }}' | |
CI_TAG: '${{ steps.step-1.outputs.tag }}' | |
UPLOAD_TO_S3: 'true' | |
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}' | |
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}' | |
AWS_BASEURL: '${{ secrets.AWS_BASEURL }}' | |
AWS_REGION: '${{ secrets.AWS_REGION }}' | |
AWS_BUCKET: '${{ secrets.AWS_BUCKET }}' | |
- id: 'step-15' | |
name: 'Upload compose logs' | |
uses: 'actions/upload-artifact@v4' | |
with: | |
name: 'compose-logs-self-hosted-macos-15' | |
path: 'app/desktop/build/compose/logs' | |
if: '${{ always() }}' | |
- id: 'step-16' | |
name: 'Cleanup temp files' | |
continue-on-error: true | |
run: 'chmod +x ./ci-helper/cleanup-temp-files-macos.sh && ./ci-helper/cleanup-temp-files-macos.sh' |