Skip to content

Commit

Permalink
[#198] Update change log config path
Browse files Browse the repository at this point in the history
  • Loading branch information
bot-nimble authored and doannimble committed Nov 10, 2023
1 parent ff16640 commit 423b3f1
Show file tree
Hide file tree
Showing 12 changed files with 256 additions and 42 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/android_deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,24 @@ 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: Find HEAD commit
id: head
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Build changelog on "main"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/configs/changelog-config.json"
# Listing PRs from the last tag to the HEAD commit
toTag: ${{ steps.head.outputs.sha }}
token: ${{ secrets.GITHUB_TOKEN }}

- 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 }}
releaseNotes: ${{ steps.changelog.outputs.changelog }}
file: build/app/outputs/flutter-apk/app-production-release.apk
24 changes: 20 additions & 4 deletions .github/workflows/android_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,31 @@ 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: Find HEAD commit
id: head
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Limit changelog to the latest pull request only
uses: jossef/action-set-json-field@v2
with:
file: .github/workflows/configs/changelog-config.json
field: max_pull_requests
value: 1

- name: Build changelog on "develop"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/configs/changelog-config.json"
# Listing PRs from the last tag to the HEAD commit
toTag: ${{ steps.head.outputs.sha }}
token: ${{ secrets.GITHUB_TOKEN }}

- 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 }}
releaseNotes: ${{ steps.changelog.outputs.changelog }}
file: build/app/outputs/flutter-apk/app-staging-debug.apk
32 changes: 32 additions & 0 deletions .github/workflows/configs/changelog-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"categories": [
{
"title": "## ✨ Features",
"labels": [
"type : feature"
]
},
{
"title": "## 🐛 Bug fixes",
"labels": [
"type : bug"
]
},
{
"title": "## 🧹 Chores",
"labels": [
"type : chore"
]
},
{
"title": "## Others",
"exclude_labels": [
"type : feature",
"type : bug",
"type : chore",
"type : release"
]
}
],
"max_pull_requests": 200
}
24 changes: 20 additions & 4 deletions .github/workflows/ios_deploy_staging_to_firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,25 @@ jobs:
run: |
echo -e "$ENV" > .env.staging
- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR
- name: Find HEAD commit
id: head
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Limit changelog to the latest pull request only
uses: jossef/action-set-json-field@v2
with:
file: .github/workflows/configs/changelog-config.json
field: max_pull_requests
value: 1

- name: Build changelog on "develop"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/configs/changelog-config.json"
# Listing PRs from the last tag to the HEAD commit
toTag: ${{ steps.head.outputs.sha }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs
Expand All @@ -70,6 +86,6 @@ jobs:

- name: Deploy to Firebase
env:
RELEASE_NOTE_CONTENT: ${{ steps.PR.outputs.pr_title }}
RELEASE_NOTE_CONTENT: ${{ steps.changelog.outputs.changelog }}
run: |
cd ./ios && bundle exec fastlane build_and_upload_staging_app
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,24 @@ 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: Find HEAD commit
id: head
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Build changelog on "main"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/configs/changelog-config.json"
# Listing PRs from the last tag to the HEAD commit
toTag: ${{#mustacheCase}}steps.head.outputs.sha{{/mustacheCase}}
token: ${{#mustacheCase}}secrets.GITHUB_TOKEN{{/mustacheCase}}

- 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}}
releaseNotes: ${{#mustacheCase}}steps.changelog.outputs.changelog{{/mustacheCase}}
file: build/app/outputs/flutter-apk/app-production-release.apk
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,31 @@ 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: Find HEAD commit
id: head
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Limit changelog to the latest pull request only
uses: jossef/action-set-json-field@v2
with:
file: .github/workflows/configs/changelog-config.json
field: max_pull_requests
value: 1

- name: Build changelog on "develop"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/configs/changelog-config.json"
# Listing PRs from the last tag to the HEAD commit
toTag: ${{#mustacheCase}}steps.head.outputs.sha{{/mustacheCase}}
token: ${{#mustacheCase}}secrets.GITHUB_TOKEN{{/mustacheCase}}

- 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}}
releaseNotes: ${{#mustacheCase}}steps.changelog.outputs.changelog{{/mustacheCase}}
file: build/app/outputs/flutter-apk/app-staging-debug.apk
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"categories": [
{
"title": "## ✨ Features",
"labels": [
"type : feature"
]
},
{
"title": "## 🐛 Bug fixes",
"labels": [
"type : bug"
]
},
{
"title": "## 🧹 Chores",
"labels": [
"type : chore"
]
},
{
"title": "## Others",
"exclude_labels": [
"type : feature",
"type : bug",
"type : chore",
"type : release"
]
}
],
"max_pull_requests": 200
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,25 @@ jobs:
run: |
echo -e "$ENV" > .env.staging
- name: Get PR information
uses: 8BitJonny/[email protected]
id: PR
- name: Find HEAD commit
id: head
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Limit changelog to the latest pull request only
uses: jossef/action-set-json-field@v2
with:
file: .github/workflows/configs/changelog-config.json
field: max_pull_requests
value: 1

- name: Build changelog on "develop"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/configs/changelog-config.json"
# Listing PRs from the last tag to the HEAD commit
toTag: ${{#mustacheCase}}steps.head.outputs.sha{{/mustacheCase}}
token: ${{#mustacheCase}}secrets.GITHUB_TOKEN{{/mustacheCase}}

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs
Expand All @@ -64,6 +80,6 @@ jobs:

- name: Deploy to Firebase
env:
RELEASE_NOTE_CONTENT: ${{ steps.PR.outputs.pr_title }}
RELEASE_NOTE_CONTENT:${{#mustacheCase}}steps.changelog.outputs.changelog{{/mustacheCase}}
run: |
cd ./ios && bundle exec fastlane build_and_upload_staging_app
19 changes: 14 additions & 5 deletions sample/.github/workflows/android_deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,24 @@ 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: Find HEAD commit
id: head
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Build changelog on "main"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/configs/changelog-config.json"
# Listing PRs from the last tag to the HEAD commit
toTag: ${{ steps.head.outputs.sha }}
token: ${{ secrets.GITHUB_TOKEN }}

- 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-debug.apk
releaseNotes: ${{ steps.changelog.outputs.changelog }}
file: build/app/outputs/flutter-apk/app-production-release.apk
24 changes: 20 additions & 4 deletions sample/.github/workflows/android_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,31 @@ 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: Find HEAD commit
id: head
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Limit changelog to the latest pull request only
uses: jossef/action-set-json-field@v2
with:
file: .github/workflows/changelog-config.json
field: max_pull_requests
value: 1

- name: Build changelog on "develop"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/configs/changelog-config.json"
# Listing PRs from the last tag to the HEAD commit
toTag: ${{ steps.head.outputs.sha }}
token: ${{ secrets.GITHUB_TOKEN }}

- 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 }}
releaseNotes: ${{ steps.changelog.outputs.changelog }}
file: build/app/outputs/flutter-apk/app-staging-debug.apk
32 changes: 32 additions & 0 deletions sample/.github/workflows/configs/changelog-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"categories": [
{
"title": "## ✨ Features",
"labels": [
"type : feature"
]
},
{
"title": "## 🐛 Bug fixes",
"labels": [
"type : bug"
]
},
{
"title": "## 🧹 Chores",
"labels": [
"type : chore"
]
},
{
"title": "## Others",
"exclude_labels": [
"type : feature",
"type : bug",
"type : chore",
"type : release"
]
}
],
"max_pull_requests": 200
}
Loading

0 comments on commit 423b3f1

Please sign in to comment.