diff --git a/.github/workflows/android_deploy.yml b/.github/workflows/android_deploy.yml new file mode 100644 index 00000000..efe17f47 --- /dev/null +++ b/.github/workflows/android_deploy.yml @@ -0,0 +1,49 @@ +name: FxBlox Android Deploy + +on: [push] + +jobs: + deploy-android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '14' # Use the same Node.js version as your project requirements + - name: Yarn Install + run: yarn install + - name: Ensure Symlink + run: npm run ensure:symlink + - name: Install CMake + run: | + echo "##[group]Install CMake" + sdkmanager --install "cmake;3.10.2.4988404" + yes | sdkmanager --licenses + echo "##[endgroup]" + - name: Get NPM Package Version + run: echo "NPM_PACKAGE_VERSION=$(node -p "require('${{ github.workspace }}/apps/box/package.json').version")" >> $GITHUB_ENV + - name: Change Android VersionCode and VersionName + run: | + NEW_VERSION_NAME=$NPM_PACKAGE_VERSION + BUILD_GRADLE_PATH=${{ github.workspace }}/apps/box/android/app/build.gradle + sed -i '' "s/versionName \".*\"/versionName \"$NEW_VERSION_NAME\"/" $BUILD_GRADLE_PATH + - name: Build Android Release + run: | + cd ${{ github.workspace }}/apps/box/android + ./gradlew assembleRelease + - name: Sign APK + uses: r0adkll/sign-android-release@v1 + with: + releaseDirectory: app/build/outputs/apk/release + signingKeyBase64: ${{ secrets.SIGNING_KEY_BASE64 }} + alias: ${{ secrets.KEY_ALIAS }} + keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.KEY_PASSWORD }} + - name: Deploy to Google Play + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} + packageName: land.fx.blox + releaseFiles: app/build/outputs/apk/release/app-release.apk + track: production diff --git a/.github/workflows/ios_deploy.yml b/.github/workflows/ios_deploy.yml new file mode 100644 index 00000000..0792f2da --- /dev/null +++ b/.github/workflows/ios_deploy.yml @@ -0,0 +1,51 @@ +name: FxBlox IOS Deploy + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + deploy-ios: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Activate correct Ruby version + run: | + echo "##[group]Activate correct Ruby version" + RUBY_VERSION=3.1.4 + asdf install ruby $RUBY_VERSION + asdf global ruby $RUBY_VERSION + echo "##[endgroup]" + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + - name: Yarn Install + run: yarn install + - name: Ensure Symlink + run: npm run ensure:symlink + - name: Cocoapods Install + run: | + cd ${{ github.workspace }}/apps/box/ios + pod install + - name: Get NPM Package Version + run: echo "NPM_PACKAGE_VERSION=$(node -p "require('${{ github.workspace }}/apps/box/package.json').version")" >> $GITHUB_ENV + - name: Set Xcode Build Number + run: /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $NPM_PACKAGE_VERSION" "${{ github.workspace }}/apps/box/ios/Box/info.plist" + - name: Xcode Archive & Export + run: | + xcodebuild -workspace ${{ github.workspace }}/apps/box/ios/Box.xcworkspace -scheme Box -configuration Release clean archive -archivePath ${{ github.workspace }}/build/Box.xcarchive + xcodebuild -exportArchive -archivePath ${{ github.workspace }}/build/Box.xcarchive -exportOptionsPlist exportOptions.plist -exportPath ${{ github.workspace }}/build + env: + DEVELOPER_TEAM: 656TD8GM9B + DISTRIBUTION_METHOD: app-store + - name: Deploy to Appstore + uses: yukiarrr/ios-build-action@v1.11.2 + with: + project-path: ${{ github.workspace }}/apps/box/ios/Box.xcworkspace + p12-base64: ${{ secrets.P12_BASE64 }} + mobileprovision-base64: ${{ secrets.MOBILEPROVISION_BASE64 }} + team-id: 656TD8GM9B + certificate-password: ${{ secrets.CERTIFICATE_PASSWORD }} + code-signing-identity: "iOS Distribution" diff --git a/bitrise.yml b/bitrise.yml index 729d5279..99202390 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -48,6 +48,10 @@ workflows: - module: app - project_location: "$BITRISE_SOURCE_DIR/apps/box/android" - deploy-to-bitrise-io@2: {} + envs: + - opts: + is_expand: false + PLATFORM: android FxBlox iOS: description: | Installs dependencies. @@ -255,6 +259,10 @@ workflows: - package_name: land.fx.blox - track: production - service_account_json_key_path: "$BITRISEIO_GooglePlay_API_JSON_URL" + envs: + - opts: + is_expand: false + PLATFORM: android FxBlox_IOS_Deploy: description: | Installs dependencies. @@ -276,10 +284,10 @@ workflows: asdf install ruby $RUBY_VERSION asdf global ruby $RUBY_VERSION - activate-ssh-key@4: {} - - git-clone@6: {} + - git-clone@8.2: {} - nvm@1: inputs: - - node_version: '16' + - node_version: '20' - yarn@0: inputs: - command: install @@ -294,11 +302,11 @@ workflows: - get-npm-package-version@1: inputs: - package_json_path: "$BITRISE_SOURCE_DIR/apps/box/package.json" - - set-xcode-build-number@1: + - set-xcode-build-number@2.0: inputs: - build_short_version_string: "$NPM_PACKAGE_VERSION" - plist_path: "$BITRISE_SOURCE_DIR/apps/box/ios/Box/info.plist" - - xcode-archive@5.0: + - xcode-archive@5: inputs: - scheme: Box - project_path: "$BITRISE_SOURCE_DIR/apps/box/ios/Box.xcworkspace" @@ -314,12 +322,10 @@ workflows: - app_id: '6444862171' - team_name: 656TD8GM9B - bundle_id: land.fx.blox + envs: + - BITRISE_PROJECT_PATH: "./apps/box/ios/Box.xcworkspace" + - BITRISE_SCHEME: Box meta: bitrise.io: stack: osx-xcode-14.3.x-ventura machine_type_id: g2-m1.4core -app: - envs: - - opts: - is_expand: false - PLATFORM: android