Bluesky app fork with some witchin' additions 💫

Clarify some things in OTA docs (#4367)

* Clarify some things

* add github outputs script

* add slack notify android

* test slack android

* fix indent

* fix test

* sigh...

* Revert "fix test"

This reverts commit c99764464f0e0d147587e3b813319b9b887a30d8.

* Revert "fix indent"

This reverts commit 4cce508d280c4f9e7b0ee6f9c2693fa88d2b65f4.

* Revert "test slack android"

This reverts commit b02419b2471e99faa5bac860276fc71b11d35b6a.

* test ios workflow

* remove testing

* add slack info to docs

* use correct output for android

---------

Co-authored-by: Hailey <me@haileyok.com>

authored by

Eric Bailey
Hailey
and committed by
GitHub
deea2f38 7613cdb8

+59 -10
+9 -2
.github/workflows/build-submit-android.yml
··· 34 34 node-version-file: .nvmrc 35 35 cache: yarn 36 36 37 + - name: 🪛 Setup jq 38 + uses: dcarbone/install-jq-action@v2 39 + 37 40 - name: 🔨 Setup EAS 38 41 uses: expo/expo-github-action@v8 39 42 with: ··· 96 99 name: build-${{ steps.timestamp.outputs.time }}.apk 97 100 path: build.apk 98 101 102 + - name: 📚 Get version from package.json 103 + id: get-build-info 104 + run: bash scripts/setGitHubOutput.sh 105 + 99 106 - name: 🔔 Notify Slack of Production Build 100 107 if: ${{ inputs.profile == 'production' }} 101 108 uses: slackapi/slack-github-action@v1.25.0 102 109 with: 103 110 payload: | 104 111 { 105 - "text": "Android build is ready for submission. This is a production build! Download the artifact here: ${{ steps.upload-artifact-production.outputs.artifact-url }}" 112 + "text": "Android production build for Google Play Store submission is ready!\n```Artifact: ${{ steps.upload-artifact-production.outputs.artifact-url }}\nVersion Number: ${{ steps.get-build-info.outputs.PACKAGE_VERSION }}\nBuild Number: ${{ steps.get-build-info.outputs.BSKY_ANDROID_VERSION_CODE }}```" 106 113 } 107 114 env: 108 115 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLIENT_ALERT_WEBHOOK }} ··· 140 147 with: 141 148 payload: | 142 149 { 143 - "text": "Android production APK build is ready for download. This is a production build, and you should add it to the GitHub release! Download the artifact here: ${{ steps.upload-artifact-production-apk.outputs.artifact-url }}" 150 + "text": "Android production build for GitHub/Obtanium is ready!\n```Artifact: ${{ steps.upload-artifact-production-apk.outputs.artifact-url }}\nVersion Number: ${{ steps.get-build-info.outputs.PACKAGE_VERSION }}\nBuild Number: ${{ steps.get-build-info.outputs.BSKY_ANDROID_VERSION_CODE }}```" 144 151 } 145 152 env: 146 153 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLIENT_ALERT_WEBHOOK }}
+19
.github/workflows/build-submit-ios.yml
··· 34 34 node-version-file: .nvmrc 35 35 cache: yarn 36 36 37 + - name: 🪛 Setup jq 38 + uses: dcarbone/install-jq-action@v2 39 + 37 40 - name: 🔨 Setup EAS 38 41 uses: expo/expo-github-action@v8 39 42 with: ··· 80 83 81 84 - name: 🚀 Deploy 82 85 run: eas submit -p ios --non-interactive --path build.ipa 86 + 87 + - name: 📚 Get version from package.json 88 + id: get-build-info 89 + run: bash scripts/setGitHubOutput.sh 90 + 91 + - name: 🔔 Notify Slack of Production Build 92 + if: ${{ inputs.profile == 'production' }} 93 + uses: slackapi/slack-github-action@v1.25.0 94 + with: 95 + payload: | 96 + { 97 + "text": "iOS production build for App Store submission is ready!\n```Artifact: Check TestFlight to know when it is available\nVersion Number: ${{ steps.get-build-info.outputs.PACKAGE_VERSION }}\nBuild Number: ${{ steps.get-build-info.outputs.BSKY_IOS_BUILD_NUMBER }}```" 98 + } 99 + env: 100 + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLIENT_ALERT_WEBHOOK }} 101 + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK 83 102 84 103 - name: ⬇️ Restore Cache 85 104 id: get-base-commit
+22 -8
docs/deploy-ota.md
··· 14 14 15 15 ### Prerequisites 16 16 17 - - Remove any internal client from your device and download the client from the App Store/Google Play. This will help for 18 - testing as well as retrieving the build number. 19 - - You should have signed in to EAS locally through npx eas login. You will need to modify the build number in a 20 - subsequent step. 21 - - Identify the build number of the production app you want to deploy an update for. iOS and Android build numbers are 22 - divergent, so you will need to find both 17 + - Find the latest production build number for both iOS and Android in Slack. These are listed in #client-builds 18 + - Production builds always send the Version Number and Build Number in the Slack message. Search for the latest 19 + production version number, and you should find the correct information. 20 + 21 + ![slack-build-info](./img/slack-build-info.png) 22 + 23 + - It may also be useful to check the current production clients for these values. This will also help for testing. Note 24 + that you will need to _fully_ remove the existing internal client build from your device, otherwise the given values in 25 + the app may differ from the actual production values. 23 26 24 27 ![app-build-number](./img/app-build-number.png) 25 28 29 + - You should have signed in to EAS locally through npx eas login. You will need to modify the build number in a 30 + subsequent step. 26 31 - Ensure that the commit the initial client was cut from is properly tagged in git. The tag should be in the format of 1.X.0 27 32 - Note: If the commit is not properly tagged, then the OTA deployment will simply fail since the GitHub Action will 28 33 not be able to find a commit to fingerprint and diff against. ··· 38 43 39 44 ### Deployment 40 45 41 - - Update the build number through EAS 46 + - Update the build number through EAS to match the build numbers of the 47 + production iOS/Android apps 42 48 - Note: This isn’t strictly necessary, but having a step that takes you off of GitHub and into the terminal provides 43 49 a little “friction” to avoid fat fingering a release. Since there are legitimate reasons to just “click and deploy” 44 50 for internal builds, I felt it useful to make sure it doesn’t accidentally become a prod deployment. 45 - - Set the build number to the appropriate build number found in the prerequisite steps. Again, this should be the 51 + - Set the build numbers to the values found in the prerequisite steps. Again, this should be the 46 52 build number for the current production release you want to deploy for. 47 53 - `npx eas build:version:set -p ios` 48 54 - `npx eas build:version:set -p android` 55 + - These steps should spit out what the current build number is, save those values 56 + for later too 49 57 - Run the deployment 50 58 - Navigate to https://github.com/bluesky-social/social-app/actions/workflows/bundle-deploy-eas-update.yml 51 59 - Select the “Run Workflow” dropdown ··· 79 87 - Launch the app once and wait approximately 15 seconds 80 88 - Relaunch the app 81 89 - Check the Settings page and scroll to the bottom. The commit hash should now be the latest commit on your deployed branch. 90 + 91 + ### Post Deployment 92 + 93 + - Reset both platforms build numbers to what they were before the OTA 94 + deployment. These values should have been logged by the EAS CLI when you 95 + reset them to the production values prior to OTA.
docs/img/slack-build-info.png

This is a binary file and will not be displayed.

+9
scripts/setGitHubOutput.sh
··· 1 + #!/bin/bash 2 + outputIos=$(eas build:version:get -p ios) 3 + outputAndroid=$(eas build:version:get -p android) 4 + BSKY_IOS_BUILD_NUMBER=${outputIos#*buildNumber - } 5 + BSKY_ANDROID_VERSION_CODE=${outputAndroid#*versionCode - } 6 + 7 + echo PACKAGE_VERSION="$(jq -r '.version' package.json)" > "$GITHUB_OUTPUT" 8 + echo BSKY_IOS_BUILD_NUMBER=$BSKY_IOS_BUILD_NUMBER >> "$GITHUB_OUTPUT" 9 + echo BSKY_ANDROID_VERSION_CODE=$BSKY_ANDROID_VERSION_CODE >> "$GITHUB_OUTPUT"