forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix INSTALL_FAILED_UPDATE_INCOMPATIBLE, add auto-signing, versioning, releases, and fork documentation #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
winnerspiros
merged 7 commits into
master
from
copilot/review-installation-failure-issues
Apr 19, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
282a1f6
fix: remove ephemeral debug keystore signing, require consistent keys…
Copilot dcbf502
fix: address runtime crash risks found during review
Copilot 90f0fb8
fix: prevent file I/O on audio thread, add safety guard in display mo…
Copilot 76cae0e
feat: add version input and auto-create GitHub Release from workflow_…
Copilot f9f74a1
feat: add versioning, auto-release, and clean APK naming to release w…
Copilot 908946d
docs: comprehensive README documenting all fork differences from upst…
Copilot ee34a92
docs: add osu-framework and veldrid fork sections to README
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| name: Generate Android Signing Keystore | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| key_password: | ||
| description: "Password for the keystore and key (min 6 characters)" | ||
| required: true | ||
| type: string | ||
| key_alias: | ||
| description: "Key alias name" | ||
| required: false | ||
| default: "osu-release" | ||
| type: string | ||
| validity_days: | ||
| description: "Certificate validity in days" | ||
| required: false | ||
| default: "10000" | ||
| type: string | ||
|
|
||
| jobs: | ||
| generate: | ||
| name: Generate Keystore | ||
| runs-on: ubuntu-latest | ||
| permissions: {} | ||
| steps: | ||
| # Mask the password so it is never printed in logs. | ||
| - name: Mask password | ||
| run: echo "::add-mask::${{ inputs.key_password }}" | ||
|
|
||
| - name: Validate inputs | ||
| run: | | ||
| if [ ${#KEY_PASSWORD} -lt 6 ]; then | ||
| echo "::error::Password must be at least 6 characters." | ||
| exit 1 | ||
| fi | ||
| env: | ||
| KEY_PASSWORD: ${{ inputs.key_password }} | ||
|
|
||
| - name: Generate keystore | ||
| run: | | ||
| keytool -genkeypair -v \ | ||
| -keystore osu-release.keystore \ | ||
| -storepass "$KEY_PASSWORD" \ | ||
| -keypass "$KEY_PASSWORD" \ | ||
| -alias "$KEY_ALIAS" \ | ||
| -keyalg RSA -keysize 2048 \ | ||
| -validity "$VALIDITY_DAYS" \ | ||
| -dname "CN=osu! Android Release,O=osu,C=US" | ||
|
|
||
| echo "Keystore generated successfully ✓" | ||
| keytool -list -v -keystore osu-release.keystore -storepass "$KEY_PASSWORD" | head -20 | ||
| env: | ||
| KEY_PASSWORD: ${{ inputs.key_password }} | ||
| KEY_ALIAS: ${{ inputs.key_alias }} | ||
| VALIDITY_DAYS: ${{ inputs.validity_days }} | ||
|
|
||
| - name: Encode keystore as base64 | ||
| id: encode | ||
| run: | | ||
| B64=$(base64 -w 0 osu-release.keystore) | ||
| echo "$B64" > keystore-base64.txt | ||
| echo "encoded=true" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Upload keystore artifact | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: osu-signing-keystore | ||
| path: osu-release.keystore | ||
| retention-days: 1 | ||
|
|
||
| - name: Upload base64 artifact | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: osu-signing-keystore-base64 | ||
| path: keystore-base64.txt | ||
| retention-days: 1 | ||
|
|
||
| - name: Output setup instructions | ||
| run: | | ||
| echo "" | ||
| echo "===================================================================" | ||
| echo " KEYSTORE GENERATED — SAVE THESE SECRETS NOW" | ||
| echo "===================================================================" | ||
| echo "" | ||
| echo " Go to: Settings → Secrets and variables → Actions → New repository secret" | ||
| echo "" | ||
| echo " Add these four secrets:" | ||
| echo "" | ||
| echo " 1. ANDROID_KEYSTORE_BASE64" | ||
| echo " → Value: contents of the 'keystore-base64.txt' file from the" | ||
| echo " 'osu-signing-keystore-base64' artifact (download it above)" | ||
| echo "" | ||
| echo " 2. ANDROID_SIGNING_KEY_ALIAS" | ||
| echo " → Value: ${{ inputs.key_alias }}" | ||
| echo "" | ||
| echo " 3. ANDROID_SIGNING_KEY_PASSWORD" | ||
| echo " → Value: the password you entered when triggering this workflow" | ||
| echo "" | ||
| echo " 4. ANDROID_SIGNING_STORE_PASSWORD" | ||
| echo " → Value: the password you entered when triggering this workflow" | ||
| echo "" | ||
| echo " IMPORTANT:" | ||
| echo " • Keep a backup of the keystore file! If you lose it, you will" | ||
| echo " never be able to update your installed APK — you would have to" | ||
| echo " uninstall and reinstall (losing all local data)." | ||
| echo " • After saving the secrets, DELETE this workflow run to remove" | ||
| echo " the keystore artifact (Settings → Actions → this run → Delete)." | ||
| echo "" | ||
| echo " After saving the secrets, run the 'Build Android APK' workflow." | ||
| echo "===================================================================" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow uploads the signing keystore and its base64 encoding as artifacts. That makes the private signing key retrievable by anyone who can access workflow artifacts, which defeats the purpose of APK signing and enables malicious update signing if leaked. Prefer generating/storing the keystore outside GitHub Actions and adding it directly to repository secrets, or ensure this workflow only runs in a tightly restricted/private repo where artifact access is controlled.