Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Erfan Shekarchi committed Apr 3, 2024
2 parents 092c60b + ee0f8dc commit 36496ed
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 9 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/android_deploy.yml
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions .github/workflows/ios_deploy.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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"
24 changes: 15 additions & 9 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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"
Expand All @@ -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

0 comments on commit 36496ed

Please sign in to comment.