Alpha - Build and Deploy #157
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
name: Alpha - Build and Deploy | |
on: | |
push: | |
branches: | |
- test/IOS-8112_ci_cd_alpha_builds_workflow # TODO: Test only, remove | |
workflow_dispatch: | |
concurrency: | |
group: '${{ github.workflow }} (${{ github.head_ref || github.ref_name }})' | |
cancel-in-progress: true | |
jobs: | |
prepare: | |
name: Prepare information | |
runs-on: self-hosted | |
outputs: | |
version: '${{ steps.jira.outputs.key }}' | |
stage: Alpha | |
build_number: '${{ github.run_number }}' | |
changelog: '${{ steps.jira.outputs.summary }}' | |
steps: | |
- name: Jira Login | |
uses: atlassian/gajira-login@master | |
env: | |
JIRA_BASE_URL: '${{ secrets.JIRA_URL }}' | |
JIRA_USER_EMAIL: '${{ secrets.JIRA_USER }}' | |
JIRA_API_TOKEN: '${{ secrets.JIRA_TOKEN }}' | |
- name: Get Jira Issue Number from Branch Name | |
id: jira | |
uses: tangem/jira-action@master | |
with: | |
action: getBranchSummary | |
branch-name: '${{ github.ref_name }}' | |
- name: Find sec identities test | |
run: | | |
echo "concurrency_group: ${{ github.workflow }} (${{ github.head_ref || github.ref_name }})" | |
echo "find-identity: $(security find-identity -p codesigning -v)" | |
echo "Provisioning Profiles: $(ls -ltra ~/Library/MobileDevice/Provisioning\ Profiles)" | |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles\ Backup | |
echo "Provisioning Profiles: $(ls -ltra ~/Library/MobileDevice/Provisioning\ Profiles)" | |
echo "Provisioning Profiles Backup: $(ls -ltra ~/Library/MobileDevice/Provisioning\ Profiles\ Backup)" | |
xcodebuild -allowProvisioningUpdates -workspace 'TangemApp.xcworkspace' -scheme 'Tangem Alpha' | |
build: | |
name: Tangem Alpha | |
needs: prepare | |
uses: tangem/actions/.github/workflows/build.yml@main | |
with: | |
stage: '${{ needs.prepare.outputs.stage }}' | |
version: '${{ needs.prepare.outputs.version }}' | |
build_number: '${{ needs.prepare.outputs.build_number }}' | |
path: fastlane/builds/ | |
filename: Tangem-${{ needs.prepare.outputs.stage }}-${{ needs.prepare.outputs.version }}(${{ needs.prepare.outputs.build_number }}).ipa | |
secrets: | |
GH_MOBILE_PAT: '${{ secrets.GH_MOBILE_PAT }}' | |
deploy: | |
name: Google Distribution | |
needs: | |
- prepare | |
- build | |
uses: tangem/actions/.github/workflows/deploy-firebase.yml@main | |
if: false # TODO: Temp disabled, enable | |
with: | |
stage: '${{ needs.prepare.outputs.stage }}' | |
version: '${{ needs.prepare.outputs.version }}' | |
build_number: '${{ needs.prepare.outputs.build_number }}' | |
changelog: '${{ needs.prepare.outputs.changelog }}' | |
filename: Tangem-${{ needs.prepare.outputs.stage }}-${{ needs.prepare.outputs.version }}(${{ needs.prepare.outputs.build_number }}).ipa | |
secrets: | |
FIREBASE_APP_ID: '${{ secrets.FIREBASE_APP_ID }}' | |
FIREBASE_CLI_TOKEN: '${{ secrets.FIREBASE_CLI_TOKEN }}' | |
GH_MOBILE_PAT: '${{ secrets.GH_MOBILE_PAT }}' | |
notification: | |
name: Deploy Notification | |
needs: | |
- prepare | |
- deploy | |
if: false # TODO: Temp disabled, enable | |
uses: tangem/actions/.github/workflows/notification.yml@main | |
with: | |
channel: '${{ vars.SLACK_CHANNEL_DEPLOYMENTS_IOS }}' | |
status: success | |
app_name: '${{ vars.APP_ALPHA }}' | |
deploy_to: '${{ vars.DEPLOYMENT_GOOGLE_DISTRIBUTION }}' | |
version: '${{ needs.prepare.outputs.version }}' | |
build_number: '${{ needs.prepare.outputs.build_number }}' | |
changelog: '${{ needs.prepare.outputs.changelog }}' | |
secrets: | |
SLACK_BOT_TOKEN: '${{ secrets.SLACK_BOT_TOKEN }}' | |
error_notification: | |
name: Error Notification | |
#if: failure() | |
if: false # TODO: Temp disabled, enable | |
needs: | |
- prepare | |
- deploy | |
uses: tangem/actions/.github/workflows/notification.yml@main | |
with: | |
channel: '${{ vars.SLACK_CHANNEL_DEPLOYMENTS_IOS }}' | |
status: error | |
app_name: '${{ vars.APP_ALPHA }}' | |
deploy_to: '${{ vars.DEPLOYMENT_GOOGLE_DISTRIBUTION }}' | |
version: '${{ needs.prepare.outputs.version }}' | |
build_number: '${{ needs.prepare.outputs.build_number }}' | |
changelog: '${{ needs.prepare.outputs.changelog }}' | |
secrets: | |
SLACK_BOT_TOKEN: '${{ secrets.SLACK_BOT_TOKEN }}' |