Skip to content

Commit

Permalink
Generate a new version for HybridApp
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Oct 24, 2024
1 parent da96e25 commit 7fdd0f6
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/createNewVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,64 @@ jobs:
uses: ./.github/actions/composite/announceFailedWorkflowInSlack
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

createNewHybridVersion:
runs-on: macos-latest
needs: [validateActor, createNewVersion]
if: ${{ fromJSON(needs.validateActor.outputs.HAS_WRITE_ACCESS) }}
defaults:
run:
working-directory: Mobile-Expensify
steps:
- name: Run turnstyle
uses: softprops/turnstyle@49108bdfa571e62371bd2c3094893c547ab3fc03
with:
poll-interval-seconds: 10
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v4
with:
repository: 'Expensify/Mobile-Expensify'
submodules: true
fetch-depth: 0
path: 'Mobile-Expensify'
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}

- name: Update submodule
run: |
cd react-native
git submodule update --init
- name: Setup git for OSBotify
uses: ./.github/actions/composite/setupGitForOSBotify
id: setupGitForOSBotify
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Generate version
run: |
SHORT_APP_VERSION=$(echo "$NEW_VERSION" | awk -F'-' '{print $1}')
BUILD_NUMBER=$(echo "$NEW_VERSION" | awk -F'-' '{print $2}')
tools/buildtools/bump-version-automatically.sh "$SHORT_APP_VERSION" "$BUILD_NUMBER"
env:
NEW_VERSION: ${{ steps.createNewVersion.outputs.NEW_VERSION }}

- name: Commit new version
run: |
git add \
./Android/AndroidManifest.xml \
./app/config/config.json \
./iOS/Expensify/Expensify-Info.plist\
./iOS/SmartScanExtension/Info.plist \
git commit -m "Update version to ${{ steps.createNewVersion.outputs.NEW_VERSION }}"
- name: Update main branch
run: git push origin main

- name: Announce failed workflow in Slack
if: ${{ failure() }}
uses: ./.github/actions/composite/announceFailedWorkflowInSlack
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ jobs:
name: Build and deploy Android HybridApp
needs: prep
runs-on: ubuntu-latest-xl
# Only deploy HybridApp to staging
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
defaults:
run:
working-directory: Mobile-Expensify/react-native
Expand All @@ -185,6 +187,7 @@ jobs:
- name: Update submodule
run: |
git submodule update --init
# TODO: REMOVE THIS LINE
git checkout andrew-mobile-deploy
- name: Configure MapBox SDK
Expand Down Expand Up @@ -469,6 +472,8 @@ jobs:
runs-on: macos-13-xlarge
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.0.app/Contents/Developer
# Only deploy HybridApp to staging
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
defaults:
run:
working-directory: Mobile-Expensify/react-native
Expand All @@ -485,6 +490,7 @@ jobs:
- name: Update submodule
run: |
git submodule update --init
# TODO: REMOVE THIS LINE
git checkout andrew-mobile-deploy
- name: Configure MapBox SDK
Expand Down

0 comments on commit 7fdd0f6

Please sign in to comment.