Skip to content

Commit

Permalink
Builld: Modify CI for release
Browse files Browse the repository at this point in the history
  • Loading branch information
0thElement committed Aug 24, 2023
1 parent 4dd728a commit 8eeb0f3
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 112 deletions.
108 changes: 94 additions & 14 deletions .github/workflows/release_internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: Deploy for internal testing

on:
push:
branches: internal
branches:
- '**'
tags-ignore:
- '**'
workflow_dispatch:

jobs:

build:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
Expand All @@ -17,7 +19,6 @@ jobs:
- StandaloneLinux64
- StandaloneWindows64
- StandaloneOSX
- Android
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -46,11 +47,6 @@ jobs:
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: ArcCreate
androidKeystoreName: arccreate
androidKeystoreBase64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
androidKeystorePass: ${{ secrets.ANDROID_KEYSTORE_PASS }}
androidKeyaliasName: ${{ secrets.ANDROID_KEYALIAS_NAME }}
androidKeyaliasPass: ${{ secrets.ANDROID_KEYALIAS_PASS }}

- uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -94,8 +90,8 @@ jobs:

- uses: actions/upload-artifact@v3
with:
name: build-AndroidBundle
path: build/AndroidBundle
name: build-Android
path: build/Android

releaseToGooglePlay:
name: Release to the Google Play Store
Expand All @@ -105,7 +101,7 @@ jobs:
GOOGLE_PLAY_KEY_FILE: ${{ secrets.GOOGLE_PLAY_KEY_FILE }}
GOOGLE_PLAY_KEY_FILE_PATH:
${{ format('{0}/fastlane/google-fastlane.json', github.workspace) }}
ANDROID_BUILD_FILE_PATH: ${{ format('{0}/build/AndroidBundle/Android.aab', github.workspace) }}
ANDROID_BUILD_FILE_PATH: ${{ format('{0}/build/Android/Android.aab', github.workspace) }}
ANDROID_PACKAGE_NAME: ${{ secrets.ANDROID_PACKAGE_NAME }}
steps:
- name: Checkout Repository
Expand All @@ -114,8 +110,8 @@ jobs:
- name: Download Android Artifact
uses: actions/download-artifact@v2
with:
name: build-AndroidBundle
path: build/AndroidBundle
name: build-Android
path: build/Android

- name: Add Authentication
run: echo "$GOOGLE_PLAY_KEY_FILE" > $GOOGLE_PLAY_KEY_FILE_PATH
Expand All @@ -135,4 +131,88 @@ jobs:
if: always()
uses: geekyeggo/delete-artifact@v1
with:
name: build-Android
name: build-Android

buildForiOSPlatform:
name: Build for iOS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Decrypt & extract secrets
run: ./decrypt_secret.sh
env:
SECRET_PASSPHRASE: ${{ secrets.ENCRYPTED_FILE_SECRET_PASSPHRASE }}

- uses: actions/cache@v2
with:
path: Library
key: Library-iOS

- uses: actions/cache@v2
with:
path: Library
key:
Library-iOS-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-iOS-
Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: iOS
buildName: ArcCreate

- uses: actions/upload-artifact@v2
with:
name: build-iOS
path: build/iOS

releaseToAppStore:
name: Release to the App Store
runs-on: macos-latest
needs: buildForiOSPlatform
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Download iOS Artifact
uses: actions/download-artifact@v2
with:
name: build-iOS
path: build/iOS

- name: Fix File Permissions and Run fastlane
env:
APPLE_CONNECT_EMAIL: ${{ secrets.APPLE_CONNECT_EMAIL }}
APPLE_DEVELOPER_EMAIL: ${{ secrets.APPLE_DEVELOPER_EMAIL }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}

MATCH_REPOSITORY: ${{ secrets.MATCH_REPOSITORY }}
MATCH_DEPLOY_KEY: ${{ secrets.MATCH_DEPLOY_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}

APPSTORE_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
APPSTORE_KEY_ID: ${{ secrets.APPSTORE_KEY_ID }}
APPSTORE_P8: ${{ secrets.APPSTORE_P8 }}

IOS_BUILD_PATH: ${{ format('{0}/build/iOS/ArcCreate', github.workspace) }}
IOS_BUNDLE_ID: com.Arcthesia.ArcCreate
PROJECT_NAME: ArcCreate
run: |
ls $IOS_BUILD_PATH
eval "$(ssh-agent -s)"
ssh-add - <<< "${MATCH_DEPLOY_KEY}"
find $IOS_BUILD_PATH -type f -name "**.sh" -exec chmod +x {} \;
bundle install
bundle exec fastlane ios beta
- name: Cleanup to avoid storage limit
if: always()
uses: geekyeggo/delete-artifact@v1
with:
name: build-iOS
31 changes: 23 additions & 8 deletions .github/workflows/release_public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ name: Deploy for public release

on:
push:
branches: master
tags:
- '*'
workflow_dispatch:

jobs:
build:
permissions:
contents: write
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -46,7 +49,6 @@ jobs:
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: ArcCreate
androidAppBundle: true
androidKeystoreName: arccreate
androidKeystoreBase64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
androidKeystorePass: ${{ secrets.ANDROID_KEYSTORE_PASS }}
Expand All @@ -59,6 +61,20 @@ jobs:
name: build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}

- name: Zip Build
uses: montudor/action-zip@v1
with:
args: zip -qq -r build/${{ matrix.targetPlatform }}.zip build/${{ matrix.targetPlatform }}

- name: Upload Zip to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/${{ matrix.targetPlatform }}.zip
asset_name: ${{ matrix.targetPlatform }}.zip
tag: ${{ github.ref }}
overwrite: true

releaseToGooglePlay:
name: Release to the Google Play Store
runs-on: ubuntu-latest
Expand All @@ -72,27 +88,26 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Download Android Artifact
uses: actions/download-artifact@v2
with:
name: build-Android
path: build/Android

- name: Add Authentication
run: echo "$GOOGLE_PLAY_KEY_FILE" > $GOOGLE_PLAY_KEY_FILE_PATH

- name: Set up Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true

- name: Upload to Google Play Internal
uses: maierj/fastlane-action@v2.0.1
with:
lane: 'android production'
- name: Cleanup to avoid storage limit
if: always()
uses: geekyeggo/delete-artifact@v1
with:
name: build-Android

releaseToAppStore:
name: Release to the App Store
Expand Down Expand Up @@ -131,4 +146,4 @@ jobs:
ssh-add - <<< "${MATCH_DEPLOY_KEY}"
find $IOS_BUILD_PATH -type f -name "**.sh" -exec chmod +x {} \;
bundle install
bundle exec fastlane ios beta
bundle exec fastlane ios release
84 changes: 0 additions & 84 deletions .github/workflows/testflight.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Assets/Materials/Compose/Waveform.mat
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _ToSample: 13918327
- _ToSample: 10478160
- _UVSec: 0
- _ZWrite: 1
m_Colors:
Expand Down
2 changes: 1 addition & 1 deletion Assets/Materials/Gameplay/PracticeeWaveform.mat
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AudioLength: 11645382
- _AudioLength: 29642254
- _BumpScale: 1
- _CurrentTimingSample: 0
- _Cutoff: 0.5
Expand Down
1 change: 0 additions & 1 deletion Assets/Scripts/Storage/FileStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public static void MigrateToNewStorage()
}

File.Copy(realLegacyPath, targetPath);
File.Delete(realLegacyPath);
}

Collection.Delete(Query.All());
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ PlayerSettings:
androidMaxAspectRatio: 2.1
applicationIdentifier: {}
buildNumber:
iPhone: 38
iPhone: 39
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 19
AndroidTargetSdkVersion: 0
Expand Down
4 changes: 2 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ end
platform :android do
desc "Upload a new Android version to the production Google Play Store"
lane :production do
upload_to_play_store(track: 'production', release_status: 'draft', aab: "#{ENV['ANDROID_BUILD_FILE_PATH']}")
upload_to_play_store(track: 'production', release_status: 'completed', aab: "#{ENV['ANDROID_BUILD_FILE_PATH']}")
end

desc "Upload a new Android internal version to Google Play"
lane :internal do
upload_to_play_store(track: 'internal', release_status: 'draft', aab: "#{ENV['ANDROID_BUILD_FILE_PATH']}")
upload_to_play_store(track: 'internal', release_status: 'completed', aab: "#{ENV['ANDROID_BUILD_FILE_PATH']}")
end
end

0 comments on commit 8eeb0f3

Please sign in to comment.