diff --git a/.github/workflows/deploy_app_store.yml b/.github/workflows/deploy_app_store.yml index 3fc7756b..cda9b9a8 100644 --- a/.github/workflows/deploy_app_store.yml +++ b/.github/workflows/deploy_app_store.yml @@ -60,6 +60,10 @@ jobs: run: bundle exec pod install shell: bash + - uses: yanamura/ios-bump-version@v1 + with: + build-number: ${{github.run_number}} + - name: Build and Test run: bundle exec fastlane buildAndTest diff --git a/.github/workflows/deploy_production_firebase.yml b/.github/workflows/deploy_production_firebase.yml index c20af014..604a72e6 100644 --- a/.github/workflows/deploy_production_firebase.yml +++ b/.github/workflows/deploy_production_firebase.yml @@ -59,6 +59,10 @@ jobs: run: bundle exec pod install shell: bash + - uses: yanamura/ios-bump-version@v1 + with: + build-number: ${{github.run_number}} + - name: Build and Test run: bundle exec fastlane buildAndTest diff --git a/.github/workflows/deploy_staging_firebase.yml b/.github/workflows/deploy_staging_firebase.yml index 34231dad..54a424ab 100644 --- a/.github/workflows/deploy_staging_firebase.yml +++ b/.github/workflows/deploy_staging_firebase.yml @@ -65,6 +65,10 @@ jobs: run: bundle exec pod install shell: bash + - uses: yanamura/ios-bump-version@v1 + with: + build-number: ${{github.run_number}} + - name: Build and Test run: bundle exec fastlane buildAndTest diff --git a/.github/workflows/test_upload_build_to_test_flight.yml b/.github/workflows/test_upload_build_to_test_flight.yml index 4e0b390d..354e39da 100644 --- a/.github/workflows/test_upload_build_to_test_flight.yml +++ b/.github/workflows/test_upload_build_to_test_flight.yml @@ -60,6 +60,10 @@ jobs: env: MATCH_PASSWORD: ${{ secrets.MATCH_PASS }} + - uses: yanamura/ios-bump-version@v1 + with: + build-number: ${{github.run_number}} + - name: Build App and Distribute to AppStore run: bundle exec fastlane buildAndUploadToAppStore env: diff --git a/fastlane/Fastfile.swift b/fastlane/Fastfile.swift index b1dc07bd..b9520e1b 100644 --- a/fastlane/Fastfile.swift +++ b/fastlane/Fastfile.swift @@ -75,7 +75,7 @@ class Fastfile: LaneFile { desc("Build Staging app and upload to Firebase") setAppVersion() - bumpBuild() +// bumpBuild() buildAdHocStagingLane() @@ -91,7 +91,7 @@ class Fastfile: LaneFile { desc("Build Production app and upload to Firebase") setAppVersion() - bumpBuild() +// bumpBuild() buildAdHocProductionLane() @@ -108,11 +108,11 @@ class Fastfile: LaneFile { setAppVersion() AppStoreAuthentication.connectAPIKey() - if Secret.bumpAppStoreBuildNumber { - bumpAppstoreBuild() - } else { - bumpBuild() - } +// if Secret.bumpAppStoreBuildNumber { +// bumpAppstoreBuild() +// } else { +// bumpBuild() +// } buildAppStoreLane() @@ -127,7 +127,7 @@ class Fastfile: LaneFile { desc("Build Production app and upload to TestFlight") setAppVersion() - bumpBuild() +// bumpBuild() buildAppStoreLane() @@ -191,21 +191,21 @@ class Fastfile: LaneFile { ) } - private func bumpBuild(buildNumber: Int = numberOfCommits()) { - desc("Set build number with number of commits") - incrementBuildNumber( - buildNumber: .userDefined(String(buildNumber)), - xcodeproj: .userDefined(Constant.projectPath) - ) - } - - private func bumpAppstoreBuild() { - desc("Set build number with App Store latest build") - let theLatestBuildNumber = latestTestflightBuildNumber( - appIdentifier: Constant.productionBundleId - ) + 1 - incrementBuildNumber( - buildNumber: .userDefined("\(theLatestBuildNumber)") - ) - } +// private func bumpBuild(buildNumber: Int = numberOfCommits()) { +// desc("Set build number with number of commits") +// incrementBuildNumber( +// buildNumber: .userDefined(String(buildNumber)), +// xcodeproj: .userDefined(Constant.projectPath) +// ) +// } +// +// private func bumpAppstoreBuild() { +// desc("Set build number with App Store latest build") +// let theLatestBuildNumber = latestTestflightBuildNumber( +// appIdentifier: Constant.productionBundleId +// ) + 1 +// incrementBuildNumber( +// buildNumber: .userDefined("\(theLatestBuildNumber)") +// ) +// } }