-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ece97e2
commit 6eb567d
Showing
5 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Build and deploy apps for testing | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer | ||
|
||
jobs: | ||
validateActor: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
IS_DEPLOYER: ${{ fromJSON(steps.isUserDeployer.outputs.isTeamMember) || github.actor == 'OSBotify' }} | ||
steps: | ||
- id: isUserDeployer | ||
uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
username: ${{ github.actor }} | ||
team: mobile-deployers | ||
|
||
android: | ||
name: Build and deploy Android | ||
needs: validateActor | ||
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: Expensify/App/.github/actions/composite/setupNode@main | ||
|
||
- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 | ||
with: | ||
ruby-version: '2.7' | ||
bundler-cache: true | ||
|
||
- name: Decrypt keystore | ||
run: cd android/app && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output my-upload-key.keystore my-upload-key.keystore.gpg | ||
env: | ||
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | ||
|
||
- name: Decrypt json key | ||
run: cd android/app && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output android-fastlane-json-key.json android-fastlane-json-key.json.gpg | ||
env: | ||
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | ||
|
||
- name: Run Fastlane beta test | ||
id: runFastlaneBetaTest | ||
run: bundle exec fastlane android build_test | ||
env: | ||
S3_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
S3_BUCKET: ad-hoc-expensify-cash | ||
S3_REGION: us-east-1 | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: paths.json | ||
path: ./paths.json | ||
|
||
|
||
postGithubComment: | ||
runs-on: ubuntu-latest | ||
name: An example job to comment a PR | ||
needs: [android] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: paths.json | ||
|
||
- id: set_var | ||
run: | | ||
content=`cat ./paths.json` | ||
content="${content//'%'/'%25'}" | ||
content="${content//$'\n'/'%0A'}" | ||
content="${content//$'\r'/'%0D'}" | ||
echo "::set-output name=paths::$content" | ||
- name: Comment PR | ||
uses: thollander/actions-comment-pull-request@v1 | ||
with: | ||
message: | | ||
'Hello world ! ${{fromJson(steps.set_var.outputs.paths).html_path}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Autogenerated by fastlane | ||
# | ||
# Ensure this file is checked in to source control! | ||
|
||
gem 'fastlane-plugin-aws_s3' |