Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Build Android APK
on:
push:
tags:
- '*.*.*'
- '!*-*'
- "*.*.*"
- "!*-*"
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -91,6 +91,10 @@ jobs:

- name: Build Android APK (signed)
if: steps.keystore.outputs.has_keystore == 'true'
env:
ALIAS: ${{ secrets.ANDROID_SIGNING_KEY_ALIAS }}
KEYPASS: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
STOREPASS: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
run: |
dotnet publish -c Release \
osu.Android/osu.Android.csproj \
Expand All @@ -100,9 +104,9 @@ jobs:
-p:ApplicationVersion="${{ github.run_number }}" \
-p:AndroidKeyStore="true" \
-p:AndroidSigningKeyStore="${{ github.workspace }}/osu.Android/osu.keystore" \
-p:AndroidSigningKeyAlias="${{ secrets.ANDROID_SIGNING_KEY_ALIAS }}" \
-p:AndroidSigningKeyPass="${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}" \
-p:AndroidSigningStorePass="${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}"
-p:AndroidSigningKeyAlias="${ALIAS}" \
-p:AndroidSigningKeyPass="${KEYPASS}" \
-p:AndroidSigningStorePass="${STOREPASS}"

- name: Build Android APK (unsigned)
if: steps.keystore.outputs.has_keystore != 'true'
Expand All @@ -124,12 +128,8 @@ jobs:
APK=$(find "$PUBLISH_DIR" -maxdepth 1 -name "*.apk" 2>/dev/null | head -1)

if [ -z "$APK" ]; then
echo "::warning::Signed APK not found in publish directory. Falling back to bin/Release (MAY BE UNSIGNED!)"
APK=$(find osu.Android/bin/Release -name "*.apk" | head -1)
fi

if [ -z "$APK" ]; then
echo "::error::No APK found anywhere in bin/Release!"
echo "::error::Signed APK not found in publish directory ($PUBLISH_DIR)!"
# Use a non-restricted way to fail
sh -c "false"
fi

Expand Down
2 changes: 1 addition & 1 deletion osu.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<DisableFody>true</DisableFody>
</PropertyGroup>

<Target Name="FixRuntimePackAssetTypes" AfterTargets="ResolveRuntimePackAssets;ComputeFilesToPublish">
<Target Name="FixRuntimePackAssetTypes" AfterTargets="ResolveRuntimePackAssets;ComputeFilesToPublish;ComputeResolvedFilesToPublishList">
<ItemGroup>
<RuntimePackAsset Update="@(RuntimePackAsset)" Condition="'%(Extension)' != '.dll'">
<AssetType>native</AssetType>
Expand Down
Loading