Skip to content

Commit

Permalink
[#198] Add release notes for Android staging/production and iOS staging
Browse files Browse the repository at this point in the history
  • Loading branch information
doannimble committed Nov 3, 2023
1 parent 8f16547 commit ff16640
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/android_deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ jobs:
- name: Build Android apk
run: flutter build apk --flavor production --release --build-number $GITHUB_RUN_NUMBER

- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Deploy Android Production to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
releaseNotes: ${{ steps.PR.outputs.pr_body }}
file: build/app/outputs/flutter-apk/app-production-release.apk
5 changes: 5 additions & 0 deletions .github/workflows/android_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@ jobs:
- name: Build Android apk
run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER

- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Deploy Android Staging to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
releaseNotes: ${{ steps.PR.outputs.pr_title }}
file: build/app/outputs/flutter-apk/app-staging-debug.apk
6 changes: 6 additions & 0 deletions .github/workflows/ios_deploy_staging_to_firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
run: |
echo -e "$ENV" > .env.staging
- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

Expand All @@ -65,5 +69,7 @@ jobs:
run: cd ./ios && bundle exec fastlane sync_adhoc_staging_signing

- name: Deploy to Firebase
env:
RELEASE_NOTE_CONTENT: ${{ steps.PR.outputs.pr_title }}
run: |
cd ./ios && bundle exec fastlane build_and_upload_staging_app
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ jobs:
- name: Build Android apk
run: flutter build apk --flavor production --release --build-number $GITHUB_RUN_NUMBER

- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Deploy Android Production to Firebase
uses: wzieba/[email protected]
with:
appId: ${{#mustacheCase}}vars.FIREBASE_ANDROID_APP_ID{{/mustacheCase}}
serviceCredentialsFileContent: ${{#mustacheCase}}secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON{{/mustacheCase}}
groups: ${{#mustacheCase}}vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS{{/mustacheCase}}
releaseNotes: ${{#mustacheCase}}steps.PR.outputs.pr_body{{/mustacheCase}}
file: build/app/outputs/flutter-apk/app-production-release.apk
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ jobs:
- name: Build Android apk
run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER

- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Deploy Android Staging to Firebase
uses: wzieba/[email protected]
with:
appId: ${{#mustacheCase}}vars.FIREBASE_ANDROID_APP_ID{{/mustacheCase}}
serviceCredentialsFileContent: ${{#mustacheCase}}secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON{{/mustacheCase}}
groups: ${{#mustacheCase}}vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS{{/mustacheCase}}
releaseNotes: ${{#mustacheCase}}steps.PR.outputs.pr_title{{/mustacheCase}}
file: build/app/outputs/flutter-apk/app-staging-debug.apk
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
run: |
echo -e "$ENV" > .env.staging
- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

Expand All @@ -59,5 +63,7 @@ jobs:
run: cd ./ios && bundle exec fastlane sync_adhoc_staging_signing

- name: Deploy to Firebase
env:
RELEASE_NOTE_CONTENT: ${{ steps.PR.outputs.pr_title }}
run: |
cd ./ios && bundle exec fastlane build_and_upload_staging_app
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def self.FIREBASE_TESTER_GROUPS
end

def self.GITHUB_RUN_NUMBER
ENV["GITHUB_RUN_NUMBER"]
ENV['GITHUB_RUN_NUMBER']
end

def self.RELEASE_NOTE_CONTENT
ENV['RELEASE_NOTE_CONTENT']
end
end
2 changes: 1 addition & 1 deletion bricks/template/__brick__/ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ platform :ios do
product_name: options[:product_name],
firebase_app_id: options[:firebase_app_id],
tester_groups: options[:tester_groups],
notes: ""
notes: Environments.RELEASE_NOTE_CONTENT
)
end
end
7 changes: 6 additions & 1 deletion sample/.github/workflows/android_deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ jobs:
- name: Build Android apk
run: flutter build apk --flavor production --release --build-number $GITHUB_RUN_NUMBER

- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Deploy Android Production to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
file: build/app/outputs/flutter-apk/app-production-release.apk
releaseNotes: ${{ steps.PR.outputs.pr_body }}
file: build/app/outputs/flutter-apk/app-production-debug.apk
5 changes: 5 additions & 0 deletions sample/.github/workflows/android_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ jobs:
- name: Build Android apk
run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER

- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Deploy Android Staging to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
releaseNotes: ${{ steps.PR.outputs.pr_title }}
file: build/app/outputs/flutter-apk/app-staging-debug.apk
11 changes: 11 additions & 0 deletions sample/.github/workflows/ios_deploy_staging_to_firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ jobs:
run: |
echo -e "$ENV" > .env.staging
- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR

- name: Generate release notes
id: generate-release-notes
env:
PR_TITLE: ${{ steps.PR.outputs.pr_title }}
run: |
echo "RELEASE_NOTE_CONTENT=$PR_TITLE" >> $GITHUB_ENV
- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

Expand Down
6 changes: 5 additions & 1 deletion sample/ios/fastlane/Constants/Environments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def self.FIREBASE_TESTER_GROUPS
end

def self.GITHUB_RUN_NUMBER
ENV["GITHUB_RUN_NUMBER"]
ENV['GITHUB_RUN_NUMBER']
end

def self.RELEASE_NOTE_CONTENT
ENV['RELEASE_NOTE_CONTENT']
end
end
2 changes: 1 addition & 1 deletion sample/ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ platform :ios do
product_name: options[:product_name],
firebase_app_id: options[:firebase_app_id],
tester_groups: options[:tester_groups],
notes: ""
notes: Environments.RELEASE_NOTE_CONTENT
)
end
end

0 comments on commit ff16640

Please sign in to comment.