Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#491] Enhance CICD workflow for releasing production to Firebase App Distribution #554

Closed
wants to merge 2 commits into from

Conversation

thiennguyen0196
Copy link
Contributor

#491

What happened 👀

  • Separate 2 CD workflow to deploy develop branch on staging and main branch on production
  • Update deploy production release app rather than production debug app
  • Add creating keystore workflow

Insight 📝

N/A

Proof Of Work 📹

Show us the implementation: screenshots, GIFs, etc.

@thiennguyen0196 thiennguyen0196 self-assigned this Oct 31, 2023
@thiennguyen0196 thiennguyen0196 changed the title [#491] Update CD workflow to deploy develop branch on staging and mai… [#491] Enhance CICD workflow for releasing production to Firebase App Distribution Oct 31, 2023
@thiennguyen0196 thiennguyen0196 temporarily deployed to template-compose October 31, 2023 17:00 — with GitHub Actions Inactive
Copy link

github-actions bot commented Oct 31, 2023

1 Warning
⚠️ Uh oh! Your project is under 80% coverage!

Kover report for template-compose:

🧛 Template - Compose Unit Tests Code Coverage: 63.04%

Coverage of Modified Files:

File Coverage

Modified Files Not Found In Coverage Report:

deploy_production_to_firebase_app_distribution.yml
deploy_staging_and_production_to_firebase_app_distribution.yml

Codebase cunningly covered by count Shroud 🧛

Generated by 🚫 Danger

Copy link
Member

@luongvo luongvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thiennguyen0196 I think we should clone these CD workflows to actual run in the root .github folder to verify & ensure them can work properly 🙏

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 1 to 12
name: Deploy staging and production to Firebase App Distribution

on:
# Trigger the workflow on push action in main branch.
# So it will trigger when the PR of the feature branch was merged.
push:
branches:
- main

jobs:
deploy_staging_and_production_to_firebase_app_distribution:
name: Deploy staging and production to Firebase App Distribution
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment on lines +22 to +26
- name: Set up timezone
uses: zcong1993/setup-timezone@master
with:
timezone: Asia/Bangkok

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure deploy workflow does not need to Set up timezone step 🙏 Same for staging workflow

Comment on lines +41 to +58
- name: Run Detekt
run: ./gradlew detekt

- name: Archive Detekt reports
uses: actions/upload-artifact@v3
with:
name: DetektReports
path: build/reports/detekt/

- name: Run unit tests with Kover
run: ./gradlew koverHtmlReport

- name: Archive code coverage reports
uses: actions/upload-artifact@v3
with:
name: CodeCoverageReports
path: app/build/reports/kover/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, we don't need these code analyzing & testing steps on CD workflows. Let's save our billing resources 🙏 Same for staging workflow

path: app/build/reports/kover/

- name: Build production APK
run: ./gradlew assembleProductionRelease
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to set up keystore?

appId: ${{secrets.FIREBASE_APP_ID_PRODUCTION}}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIAL_FILE_CONTENT }}
groups: testers
file: app/build/outputs/apk/production/debug/app-production-release.apk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
file: app/build/outputs/apk/production/debug/app-production-release.apk
file: app/build/outputs/apk/production/release/app-production-release.apk

@luongvo
Copy link
Member

luongvo commented Nov 1, 2023

@thiennguyen0196 please provide POW from actual workflows in the root .github folder 🙏

@thiennguyen0196 thiennguyen0196 marked this pull request as draft November 1, 2023 02:14
@ryan-conway ryan-conway added this to the 3.27.0 milestone Dec 1, 2023
@ryan-conway ryan-conway modified the milestones: 3.27.0, 3.29.0 Apr 1, 2024
@thiennguyen0196 thiennguyen0196 deleted the feature/491-enhance-cicd-workflow branch May 28, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance CICD workflow for releasing production to Firebase App Distribution
3 participants