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
5 changes: 3 additions & 2 deletions .github/actions/setup-java-and-gradlew/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ runs:
using: 'composite'
steps:
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'zulu'

- name: Change wrapper permissions
shell: bash
Expand Down
91 changes: 66 additions & 25 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,105 @@ name: Build Android

on:
workflow_call:
inputs:
asset_url:
description: "Asset upload URL from the release workflow"
required: true
type: string

env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
FIREBASE_APPLICATION_ID: ${{ secrets.FIREBASE_APPLICATION_ID }}
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}

jobs:
build-android:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.repository.full_name }}
ref: ${{ github.event.head_ref }}

- name: Set up JDK
uses: actions/setup-java@v1
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: '21'
distribution: 'zulu'

- name: Install Codemagic CLI tools
run: pip install codemagic-cli-tools
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Write google-services.json from secret
run: echo '${{ secrets.FIREBASE_GOOGLE_SERVICES_JSON }}' > composeApp/google-services.json

- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: "keystore"
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE_64 }}

- name: Build Android APK
run: |
./gradlew composeApp:assembleRelease \
-Pandroid.injected.signing.store.file=${{ steps.decode_keystore.outputs.filePath }} \
-Pandroid.injected.signing.store.password=${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }} \
-Pandroid.injected.signing.key.alias=${{ secrets.ANDROID_KEYSTORE_ALIAS }} \
-Pandroid.injected.signing.key.password=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}

- name: Build Android AAB
run: ./gradlew composeApp:assembleRelease -Pandroid.injected.signing.store.file=${{ steps.decode_keystore.outputs.filePath }} -Pandroid.injected.signing.store.password=${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.ANDROID_KEYSTORE_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
run: |
./gradlew composeApp:bundleRelease \
-Pandroid.injected.signing.store.file=${{ steps.decode_keystore.outputs.filePath }} \
-Pandroid.injected.signing.store.password=${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }} \
-Pandroid.injected.signing.key.alias=${{ secrets.ANDROID_KEYSTORE_ALIAS }} \
-Pandroid.injected.signing.key.password=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}

- name: Build Android APK
run: ./gradlew composeApp:bundleRelease -Pandroid.injected.signing.store.file=${{ steps.decode_keystore.outputs.filePath }} -Pandroid.injected.signing.store.password=${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.ANDROID_KEYSTORE_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
- name: Get Version Name
id: get_version_name
run: |
chmod +x ./.github/scripts/get_version_name.sh
echo "version_name=$(./.github/scripts/get_version_name.sh versions.properties)" >> $GITHUB_OUTPUT

- name: Upload Release AAB Asset
- name: Upload Release APK Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_asset_url }}
asset_path: composeApp/build/outputs/bundle/release/composeApp-release.aab
asset_name: minesweeperk-${{ github.ref_name }}.aab
asset_content_type: application/x-authorware-bin
upload_url: ${{ inputs.asset_url }}
asset_path: composeApp/build/outputs/apk/release/composeApp-release.apk
asset_name: futterbock-${{ github.ref_name }}.apk
asset_content_type: application/vnd.android.package-archive

- name: Upload Release APK Asset
- name: Upload Release AAB Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_asset_url }}
asset_path: composeApp/build/outputs/apk/release/composeApp-release.apk
asset_name: minesweeperk-${{ github.ref_name }}.apk
asset_content_type: application/vnd.android.package-archive
upload_url: ${{ inputs.asset_url }}
asset_path: composeApp/build/outputs/bundle/release/composeApp-release.aab
asset_name: futterbock-${{ github.ref_name }}.aab
asset_content_type: application/x-authorware-bin

- name: Install Codemagic CLI tools
run: pip install codemagic-cli-tools

- name: Publish to Google Play Internal Track
env:
GOOGLE_PLAY_SERVICE_ACCOUNT_CREDENTIALS: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_CREDENTIALS }}
GOOGLE_PLAY_PACKAGE_NAME: org.futterbock.app
run: |
echo "Publishing Futterbock to Google Play Internal Track"

\
--bundle "composeApp/build/outputs/apk/release/composeApp-release.apk" \
--track internal
google-play bundles publish \
--bundle "composeApp/build/outputs/bundle/release/composeApp-release.aab" \
--track internal
90 changes: 90 additions & 0 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Build iOS

on:
workflow_call:

env:
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
FIREBASE_APPLICATION_ID: ${{ secrets.FIREBASE_APPLICATION_ID }}
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}

jobs:
build-ios:
permissions: write-all
runs-on: macos-15
env:
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }}
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }}
CERTIFICATE_PRIVATE_KEY: ${{ secrets.CERTIFICATE_PRIVATE_KEY }}
IOS_SCHEME: iosApp

steps:
- uses: actions/checkout@v4

- name: Write GoogleService-Info.plist from secret
run: echo '${{ secrets.FIREBASE_GOOGLE_SERVICE_INFO_PLIST }}' > iosApp/iosApp/GoogleService-Info.plist

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Install Codemagic CLI tools
run: pip install codemagic-cli-tools

- name: Set up keychain
run: keychain initialize

- name: Fetch signing files
run: |
app-store-connect fetch-signing-files $(xcode-project detect-bundle-id) \
--type IOS_APP_STORE \
--create

- name: Set up signing certificate
run: keychain add-certificates

- name: Set up code signing settings on Xcode project
run: xcode-project use-profiles


- name: Set iOS version from versions.properties
run: |
source versions.properties
VERSION_NAME="${versionMajor}.${versionMinor}.${versionPatch}"
VERSION_CODE="${versionCode}"
echo "Setting iOS version to ${VERSION_NAME} (build ${VERSION_CODE})"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${VERSION_NAME}" iosApp/iosApp/Info.plist
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${VERSION_CODE}" iosApp/iosApp/Info.plist

- name: Build IPA
run: |
cd iosApp
xcode-project build-ipa \
--project "iosApp.xcodeproj" \
--scheme "${IOS_SCHEME}"

- name: Publish to TestFlight
run: |
IPA_PATH=$(find . -name "*.ipa")
echo "Publishing Futterbock to TestFlight"
app-store-connect publish \
--path "$IPA_PATH"
15 changes: 11 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ jobs:
create-release:
uses: ./.github/workflows/create-release.yml

build-android:
needs: create-release
uses: ./.github/workflows/build-android.yml
with:
asset_url: ${{ needs.create-release.outputs.upload_asset_url }}
secrets: inherit

#build-android:
# needs: create-release
# uses: ./.github/workflows/build-android.yml
build-ios:
needs: create-release
uses: ./.github/workflows/build-ios.yml
secrets: inherit

build-windows:
needs: create-release
Expand All @@ -29,4 +36,4 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
asset_url: ${{ needs.create-release.outputs.upload_asset_url }}
secrets: inherit
secrets: inherit
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env.sh
*.jks
composeApp/google-services.json
composeApp/release
iosApp/GoogleService-Info.plist
iosApp/iosApp/GoogleService-Info.plist

.CLAUDE.local.md

2 changes: 2 additions & 0 deletions iosApp/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.futterbock.app;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand Down Expand Up @@ -337,6 +338,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 15.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.futterbock.app;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
Expand Down
30 changes: 0 additions & 30 deletions iosApp/iosApp/GoogleService-Info.plist

This file was deleted.

4 changes: 2 additions & 2 deletions versions.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
versionMajor=1
versionMinor=0
versionMinor=1
versionPatch=0
versionCode=6
versionCode=8
Loading