Skip to content

Commit

Permalink
Merge pull request #5145 from Expensify/update-staging-from-main
Browse files Browse the repository at this point in the history
  • Loading branch information
OSBotify authored Sep 8, 2021
2 parents e9d135a + 7fffbae commit bd36485
Show file tree
Hide file tree
Showing 29 changed files with 246 additions and 162 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/Standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ Where is this issue occurring?
**Logs:** https://stackoverflow.com/c/expensify/questions/4856
**Notes/Photos/Videos:** Any additional supporting documentation
**Expensify/Expensify Issue URL:**
**Issue reported by:**
**Slack conversation:**

[View all open jobs on GitHub](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22)
2 changes: 0 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,3 @@ There are several reasons why we created these "imperative workflows" or "subrou
1. It greatly simplifies the handling of race conditions, particularly when used in combination with the [`softprops/turnstyle` action](https://github.com/softprops/turnstyle).
1. It promotes code reuse. A common set of yaml steps defined in a workflow can be extracted into an imperative workflow which can be executed from other workflows in just a few lines.
1. If a workflow is defined to execute in response to the `workflow_dispatch` event, it can be manually started by an authorized actor in the GitHub UI.

#### Dummy change - delete me
12 changes: 6 additions & 6 deletions .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
createNewVersion:
needs: validateActor
runs-on: ubuntu-latest
if: ${{ needs.validateActor.outputs.IS_DEPLOYER == 'true' && github.event.inputs.NEW_VERSION == '' }}
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) && github.event.inputs.NEW_VERSION == '' }}
outputs:
NEW_VERSION: ${{ steps.getNewVersion.outputs.NEW_VERSION }}
steps:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
cherryPick:
needs: [validateActor, createNewVersion]
if: ${{ always() && needs.validateActor.outputs.IS_DEPLOYER == 'true' }}
if: ${{ always() && fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
runs-on: ubuntu-latest
steps:
# Version: 2.3.4
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
PULL_REQUEST_NUMBER: ${{ steps.createPullRequest.outputs.pr_number }}

- name: Auto-assign PR if there are merge conflicts
if: ${{ steps.cherryPick.outputs.SHOULD_AUTOMERGE == 'false' || steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'false' }}
if: ${{ !fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) || !fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }}
uses: actions-ecosystem/action-add-labels@a8ae047fee0ca28235f9764e1c478d2136dc15c1
with:
number: ${{ steps.createPullRequest.outputs.pr_number }}
Expand All @@ -161,7 +161,7 @@ jobs:
assignees: ${{ steps.getCPMergeCommit.outputs.MERGE_ACTOR }}

- name: If PR has merge conflicts, comment with instructions for assignee
if: ${{ steps.cherryPick.outputs.SHOULD_AUTOMERGE == 'false' || steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'false' }}
if: ${{ !fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) || !fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }}
uses: actions-ecosystem/action-create-comment@cd098164398331c50e7dfdd0dfa1b564a1873fac
with:
github_token: ${{ secrets.OS_BOTIFY_TOKEN }}
Expand All @@ -173,7 +173,7 @@ jobs:
- name: Check for an auto approve
# Important: only auto-approve if there was no merge conflict!
if: ${{ steps.cherryPick.outputs.SHOULD_AUTOMERGE == 'true' && steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'true' }}
if: ${{ fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) && fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }}
# Version: 2.0.0
uses: hmarr/auto-approve-action@6a9ec7556f0a7fa5b49527a1eea4878b8a22d2e0
with:
Expand All @@ -182,7 +182,7 @@ jobs:

- name: Check for an auto merge
# Important: only auto-merge if there was no merge conflict!
if: ${{ steps.cherryPick.outputs.SHOULD_AUTOMERGE == 'true' && steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'true' }}
if: ${{ fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) && fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }}
# Version: 0.12.0
uses: pascalgn/automerge-action@39d831e1bb389bd242626bc25d4060064a97181c
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
deployStaging:
runs-on: ubuntu-latest
needs: validate
if: ${{ needs.validate.outputs.isAutomatedPullRequest == 'true' && github.ref == 'refs/heads/staging' }}
if: ${{ fromJSON(needs.validate.outputs.isAutomatedPullRequest) && github.ref == 'refs/heads/staging' }}

steps:
- name: Checkout staging branch
Expand All @@ -43,7 +43,7 @@ jobs:
deployProduction:
runs-on: ubuntu-latest
needs: validate
if: ${{ needs.validate.outputs.isAutomatedPullRequest == 'true' && github.ref == 'refs/heads/production' }}
if: ${{ fromJSON(needs.validate.outputs.isAutomatedPullRequest) && github.ref == 'refs/heads/production' }}

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/finishReleaseCycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
team: mobile-deployers

- name: Reopen and comment on issue
if: ${{ steps.validateActor.outputs.isTeamMember == 'false' }}
if: ${{ !fromJSON(steps.validateActor.outputs.isTeamMember) }}
uses: Expensify/App/.github/actions/reopenIssueWithComment@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
Expand All @@ -33,15 +33,15 @@ jobs:
Reopening!
- name: Check for any deploy blockers
if: ${{ steps.validateActor.outputs.isTeamMember == 'true' }}
if: ${{ fromJSON(steps.validateActor.outputs.isTeamMember) }}
id: checkDeployBlockers
uses: Expensify/App/.github/actions/checkDeployBlockers@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}

- name: Reopen and comment on issue
if: ${{ steps.validateActor.outputs.isTeamMember == 'true' && steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS == 'true' }}
if: ${{ fromJSON(steps.validateActor.outputs.isTeamMember) && fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS) }}
uses: Expensify/App/.github/actions/reopenIssueWithComment@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
Expand All @@ -54,7 +54,7 @@ jobs:
updateProduction:
runs-on: ubuntu-latest
needs: validate
if: ${{ needs.validate.outputs.isValid == 'true' }}
if: ${{ fromJSON(needs.validate.outputs.isValid) }}
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
Expand All @@ -72,7 +72,7 @@ jobs:
createNewStagingDeployCash:
runs-on: macos-11
needs: validate
if: ${{ needs.validate.outputs.isValid == 'true' }}
if: ${{ fromJSON(needs.validate.outputs.isValid) }}
steps:
# Version: 2.3.4
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ jobs:
run: echo "VERSION_CODE=$(grep -o 'versionCode\s\+[0-9]\+' android/app/build.gradle | awk '{ print $2 }')" >> $GITHUB_ENV

- name: Run Fastlane beta
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: bundle exec fastlane android beta

- name: Run Fastlane production
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: bundle exec fastlane android production
env:
VERSION: ${{ env.VERSION_CODE }}
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
DEVELOPER_ID_SECRET_PASSPHRASE: ${{ secrets.DEVELOPER_ID_SECRET_PASSPHRASE }}

- name: Build production desktop app
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: npm run desktop-build -- --publish always -c.afterSign=desktop/notarize.js
env:
CSC_LINK: ${{ secrets.CSC_LINK }}
Expand All @@ -153,7 +153,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build staging desktop app
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: npm run desktop-build-staging -- --publish always -c.afterSign=desktop/notarize.js
env:
CSC_LINK: ${{ secrets.CSC_LINK }}
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Run Fastlane
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: bundle exec fastlane ios beta
env:
APPLE_CONTACT_EMAIL: ${{ secrets.APPLE_CONTACT_EMAIL }}
Expand All @@ -246,7 +246,7 @@ jobs:
run: echo "IOS_VERSION=$(echo '${{ github.event.release.tag_name }}' | tr '-' '.')" >> $GITHUB_ENV

- name: Run Fastlane for App Store release
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: bundle exec fastlane ios production
env:
VERSION: ${{ env.IOS_VERSION }}
Expand Down Expand Up @@ -317,32 +317,32 @@ jobs:
command: npm ci

- name: Build web for production
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: npm run build

- name: Build web for staging
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: npm run build-staging

- name: Build docs
run: npm run storybook-build

- name: Deploy production to S3
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: aws s3 cp --recursive --acl public-read $GITHUB_WORKSPACE/dist s3://expensify-cash/

- name: Deploy staging to S3
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: aws s3 cp --recursive --acl public-read $GITHUB_WORKSPACE/dist s3://staging-expensify-cash/

- name: Purge production Cloudflare cache
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: /home/runner/.local/bin/cli4 --delete hosts=["new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}

- name: Purge staging Cloudflare cache
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: /home/runner/.local/bin/cli4 --delete hosts=["staging.new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}
Expand Down Expand Up @@ -395,13 +395,13 @@ jobs:
with:
TAG: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
IS_PRODUCTION_DEPLOY: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
IS_PRODUCTION_DEPLOY: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}

- name: Comment on issues
uses: Expensify/App/.github/actions/markPullRequestsAsDeployed@main
with:
PR_LIST: ${{ steps.getReleasePRList.outputs.PR_LIST }}
IS_PRODUCTION_DEPLOY: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
IS_PRODUCTION_DEPLOY: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
DEPLOY_VERSION: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ANDROID: ${{ needs.android.result }}
Expand All @@ -418,7 +418,7 @@ jobs:
channel: '#announce',
attachments: [{
color: 'good',
text: `🎉️ Successfully deployed ${process.env.AS_REPO} v${{ env.VERSION }} to ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' && 'production' || 'staging' }} 🎉️`,
text: `🎉️ Successfully deployed ${process.env.AS_REPO} v${{ env.VERSION }} to ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'production' || 'staging' }} 🎉️`,
}]
}
env:
Expand All @@ -427,7 +427,7 @@ jobs:

- name: 'Announces a production deploy in the #expensify-open-source Slack room'
uses: 8398a7/action-slack@v3
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
with:
status: custom
custom_payload: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
skipDeploy:
runs-on: ubuntu-latest
needs: chooseDeployActions
if: ${{ needs.chooseDeployActions.outputs.isStagingDeployLocked == 'true' && needs.chooseDeployActions.outputs.isAutomatedPullRequest == 'false' && needs.chooseDeployActions.outputs.shouldCherryPick == 'false' }}
if: ${{ fromJSON(needs.chooseDeployActions.outputs.isStagingDeployLocked) && !fromJSON(needs.chooseDeployActions.outputs.isAutomatedPullRequest) && !fromJSON(needs.chooseDeployActions.outputs.shouldCherryPick) }}

steps:
- name: Comment on deferred PR
Expand All @@ -57,7 +57,7 @@ jobs:
version:
runs-on: ubuntu-latest
needs: chooseDeployActions
if: ${{ needs.chooseDeployActions.outputs.shouldCherryPick == 'true' || (needs.chooseDeployActions.outputs.isStagingDeployLocked == 'false' && needs.chooseDeployActions.outputs.isAutomatedPullRequest == 'false') }}
if: ${{ fromJSON(needs.chooseDeployActions.outputs.shouldCherryPick) || (!fromJSON(needs.chooseDeployActions.outputs.isStagingDeployLocked) && !fromJSON(needs.chooseDeployActions.outputs.isAutomatedPullRequest)) }}

steps:
# Version: 2.3.4
Expand Down Expand Up @@ -86,15 +86,15 @@ jobs:
echo "New version is ${{ env.NEW_VERSION }}"
- name: Update staging branch from main
if: ${{ needs.chooseDeployActions.outputs.isStagingDeployLocked == 'false' }}
if: ${{ !fromJSON(needs.chooseDeployActions.outputs.isStagingDeployLocked) }}
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: updateProtectedBranch.yml
INPUTS: '{ "TARGET_BRANCH": "staging" }'

- name: Cherry pick to staging
if: ${{ needs.chooseDeployActions.outputs.isStagingDeployLocked == 'true' && needs.chooseDeployActions.outputs.shouldCherryPick == 'true' }}
if: ${{ fromJSON(needs.chooseDeployActions.outputs.isStagingDeployLocked) && fromJSON(needs.chooseDeployActions.outputs.shouldCherryPick) }}
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001009401
versionName "1.0.94-1"
versionCode 1001009402
versionName "1.0.94-2"
}
splits {
abi {
Expand Down
4 changes: 2 additions & 2 deletions apple-app-site-association
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"/setpassword/*",
"/details/*",
"/v/*",
"/add-bank-account/*",
"/bank-account/*",
"/iou/*",
"/enable-payments/*",
"/enable-payments/*"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.94.1</string>
<string>1.0.94.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.94.1</string>
<string>1.0.94.2</string>
</dict>
</plist>
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.0.94-1",
"version": "1.0.94-2",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down Expand Up @@ -60,7 +60,7 @@
"electron-log": "^4.3.5",
"electron-serve": "^1.0.0",
"electron-updater": "^4.3.4",
"expensify-common": "git://github.com/Expensify/expensify-common.git#e5a22b54cde72ff3b9b6b085ea4374144e8937b2",
"expensify-common": "git://github.com/Expensify/expensify-common.git#a78cc23afe54d487ce2b7bafefa07e58d0280612",
"expo-haptics": "^10.0.0",
"file-loader": "^6.0.0",
"html-entities": "^1.3.1",
Expand Down
Loading

0 comments on commit bd36485

Please sign in to comment.