Skip to content

Commit

Permalink
test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Feb 20, 2025
1 parent 20902ef commit fed2e75
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-release-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
uses: ./.github/workflows/build-sample-app.yml
with:
app_name: "APN"
app_identifier: "io.customer.ami"
branch_name: ${{ needs.determine-branch.outputs.branch_name }}
cio-workspace-name: "Mobile: React Native"
sdk_version: ${{ needs.determine-sdk-version.outputs.resolved_version }}
Expand Down
46 changes: 36 additions & 10 deletions .github/workflows/build-sample-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: "Name of the sample app to build"
required: true
type: string
app-identifier:
description: "App identifier for the sample app"
required: true
type: string
branch_name:
description: "Branch name for versioning"
required: false
Expand Down Expand Up @@ -55,7 +59,15 @@ jobs:
fetch-depth: 0 # Workaround for bug https://github.com/actions/checkout/issues/1471

# Install CLI tools, Ruby, and Ruby dependencies for Fastlane


- name: Set IS_PRIMARY_APP
run: |
if [[ "${{ inputs.app_name }}" == "APN" ]]; then
echo "IS_PRIMARY_APP=true" >> $GITHUB_ENV
else
echo "IS_PRIMARY_APP=false" >> $GITHUB_ENV
fi
- name: Set Default Firebase Distribution Groups
shell: bash
env:
Expand All @@ -65,7 +77,6 @@ jobs:
NEXT_BUILDS_GROUP: next
PUBLIC_BUILDS_GROUP: public
# Input variables
IS_PRIMARY_APP: ${{ inputs.app_name == 'APN' }}
CURRENT_BRANCH: ${{ github.ref }}
run: |
# Initialize with the default distribution group
Expand Down Expand Up @@ -253,17 +264,32 @@ jobs:
- name: Send Slack Notification for Sample App Builds
if: env.IS_PRIMARY_APP == 'true'
env:
ANDROID_APP_ID: ${{ secrets[format('CUSTOMERIO_{0}_ANDROID_APP_ID', inputs.app_name)] }}
IOS_APP_ID: ${{ secrets[format('CUSTOMERIO_{0}_IOS_APP_ID', inputs.app_name)] }}
uses: customerio/mobile-ci-tools/.github/actions/slack-notify-sample-app/v1@mbl-750-app-slack-notify
uses: customerio/mobile-ci-tools/github-actions/slack-notify-sample-app/v1@mbl-750-app-slack-notify
with:
status: ${{ job.status }}
firebase_distribution_groups: ${{ env.firebase_distribution_groups }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
firebase_project_id: ${{ secrets.SAMPLE_APPS_FIREBASE_PROJECT_ID }}
instructions_guide_link: ${{ secrets.SAMPLE_APPS_INSTRUCTIONS_GUIDE_LINK }}
icon_url: "https://vectorified.com/images/icon-react-native-24.png"
repository_name: "React Native"
platform: "android"
app_name: ${{ inputs.app_name }}
app_identifier: ${{ inputs.app-identifier }}
build_version: "${{ env.APP_VERSION_NAME }} (${{ env.APP_VERSION_CODE }})"
firebase_distribution_groups: ${{ env.firebase_distribution_groups }}

- name: Send Slack Notification for Sample App Builds
if: env.IS_PRIMARY_APP == 'true'
uses: customerio/mobile-ci-tools/github-actions/slack-notify-sample-app/v1@mbl-750-app-slack-notify
with:
status: ${{ job.status }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
firebase_project_id: ${{ secrets.SAMPLE_APPS_FIREBASE_PROJECT_ID }}
instructions_guide_link: ${{ secrets.SAMPLE_APPS_INSTRUCTIONS_GUIDE_LINK }}
icon_url: "https://vectorified.com/images/icon-react-native-24.png"
firebase_app_ids: |
Android: ${{ env.ANDROID_APP_ID }}
iOS: ${{ env.IOS_APP_ID }}
repository_name: "React Native"
platform: "ios"
app_name: ${{ inputs.app_name }}
app_identifier: ${{ inputs.app-identifier }}
build_version: "${{ env.APP_VERSION_NAME }} (${{ env.APP_VERSION_CODE }})"
firebase_distribution_groups: ${{ env.firebase_distribution_groups }}
2 changes: 2 additions & 0 deletions .github/workflows/build-test-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ jobs:
# List item is name of directory inside of "Apps" directory for the corresponding app to compile.
- name: "APN"
cio-workspace-name: "Mobile: React Native"
identifier: "io.customer.ami"
name: Building sample app ${{ matrix.sample-app.name }}
uses: ./.github/workflows/build-sample-app.yml
with:
app_name: ${{ matrix.sample-app.name }}
app_identifier: ${{ matrix.sample-app.identifier }}
cio-workspace-name: ${{ matrix.sample-app.cio-workspace-name }}
secrets: inherit

Expand Down

0 comments on commit fed2e75

Please sign in to comment.