diff --git a/.github/workflows/deploy-nightly-testflight.yml b/.github/workflows/deploy-nightly-testflight.yml index 5b31c205fb..f1cb1163de 100644 --- a/.github/workflows/deploy-nightly-testflight.yml +++ b/.github/workflows/deploy-nightly-testflight.yml @@ -1,8 +1,11 @@ name: Deploy Nightly Testflight Release on: - schedule: - - cron: '0 5 * * *' +# schedule: +# - cron: '0 5 * * *' + push: + branches: + - hailey/use-eas-version-code jobs: build: @@ -38,4 +41,4 @@ jobs: run: yarn install - name: EAS build and submit - run: eas build -p ios --profile production --auto-submit --non-interactive + run: yarn use-build-number eas build -p ios --profile github --non-interactive diff --git a/app.config.js b/app.config.js index d66b9d119c..e710420b09 100644 --- a/app.config.js +++ b/app.config.js @@ -11,7 +11,7 @@ const DARK_SPLASH_CONFIG = { resizeMode: 'cover', } -module.exports = function () { +module.exports = function (config) { /** * App version number. Should be incremented as part of a release cycle. */ diff --git a/eas.json b/eas.json index 7db7d386d2..e1c3003147 100644 --- a/eas.json +++ b/eas.json @@ -36,6 +36,16 @@ "autoIncrement": true }, "channel": "production" + }, + "github": { + "extends": "base", + "ios": { + "autoIncrement": true + }, + "android": { + "autoIncrement": true + }, + "channel": "preview" } }, "submit": { diff --git a/package.json b/package.json index 17d6f3d3a7..87e56339d6 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,11 @@ "ios": "expo run:ios", "web": "expo start --web", "build-web": "expo export:web && node ./scripts/post-web-build.js && cp -v ./web-build/static/js/*.* ./bskyweb/static/js/", - "build-all": "yarn intl:build && eas build --platform all", + "build-all": "yarn intl:build && ./scripts/useBuildNumberEnv.sh eas build --platform all", + "build-ios": "./scripts/useBuildNumberEnv.sh eas build -p ios", + "build-android": "./scripts/useBuildNumberEnv.sh eas build -p android", + "use-build-number": "./scripts/useBuildNumberEnv.sh", + "build": "./scripts/useBuildNumberEnv.sh eas build", "start": "expo start --dev-client", "start:prod": "expo start --dev-client --no-dev --minify", "clean-cache": "rm -rf node_modules/.cache/babel-loader/*", diff --git a/scripts/setBuildNumberEnv.sh b/scripts/useBuildNumberEnv.sh similarity index 80% rename from scripts/setBuildNumberEnv.sh rename to scripts/useBuildNumberEnv.sh index 276ffeaa70..fe273d3948 100755 --- a/scripts/setBuildNumberEnv.sh +++ b/scripts/useBuildNumberEnv.sh @@ -1,5 +1,4 @@ #!/bin/bash -echo "$@" outputIos=$(eas build:version:get -p ios) outputAndroid=$(eas build:version:get -p android) currentIosVersion=${outputIos#*buildNumber - } @@ -8,4 +7,5 @@ currentAndroidVersion=${outputAndroid#*versionCode - } BSKY_IOS_BUILD_NUMBER=$((currentIosVersion+1)) BSKY_ANDROID_VERSION_CODE=$((currentAndroidVersion+1)) -bash -c "BSKY_IOS_BUILD_NUMBER=$BSKY_IOS_BUILD_NUMBER BSKY_ANDROID_VERSION_CODE=$BSKY_ANDROID_VERSION_CODE eas build -p ios --profile production" +bash -c "BSKY_IOS_BUILD_NUMBER=$BSKY_IOS_BUILD_NUMBER BSKY_ANDROID_VERSION_CODE=$BSKY_ANDROID_VERSION_CODE $*" +