Skip to content

Commit 423b3f1

Browse files
bot-nimbledoannimble
authored andcommitted
[#198] Update change log config path
1 parent ff16640 commit 423b3f1

12 files changed

+256
-42
lines changed

.github/workflows/android_deploy_production.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,24 @@ jobs:
5757
- name: Build Android apk
5858
run: flutter build apk --flavor production --release --build-number $GITHUB_RUN_NUMBER
5959

60-
- name: Get PR information
61-
uses: 8BitJonny/gh-get-current-pr@2.2.0
62-
id: PR
60+
- name: Find HEAD commit
61+
id: head
62+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
63+
64+
- name: Build changelog on "main"
65+
id: changelog
66+
uses: mikepenz/release-changelog-builder-action@v4
67+
with:
68+
configuration: ".github/workflows/configs/changelog-config.json"
69+
# Listing PRs from the last tag to the HEAD commit
70+
toTag: ${{ steps.head.outputs.sha }}
71+
token: ${{ secrets.GITHUB_TOKEN }}
6372

6473
- name: Deploy Android Production to Firebase
6574
uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0
6675
with:
6776
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
6877
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
6978
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
70-
releaseNotes: ${{ steps.PR.outputs.pr_body }}
79+
releaseNotes: ${{ steps.changelog.outputs.changelog }}
7180
file: build/app/outputs/flutter-apk/app-production-release.apk

.github/workflows/android_deploy_staging.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,31 @@ jobs:
4949
- name: Build Android apk
5050
run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER
5151

52-
- name: Get PR information
53-
uses: 8BitJonny/gh-get-current-pr@2.2.0
54-
id: PR
52+
- name: Find HEAD commit
53+
id: head
54+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
55+
56+
- name: Limit changelog to the latest pull request only
57+
uses: jossef/action-set-json-field@v2
58+
with:
59+
file: .github/workflows/configs/changelog-config.json
60+
field: max_pull_requests
61+
value: 1
62+
63+
- name: Build changelog on "develop"
64+
id: changelog
65+
uses: mikepenz/release-changelog-builder-action@v4
66+
with:
67+
configuration: ".github/workflows/configs/changelog-config.json"
68+
# Listing PRs from the last tag to the HEAD commit
69+
toTag: ${{ steps.head.outputs.sha }}
70+
token: ${{ secrets.GITHUB_TOKEN }}
5571

5672
- name: Deploy Android Staging to Firebase
5773
uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0
5874
with:
5975
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
6076
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
6177
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
62-
releaseNotes: ${{ steps.PR.outputs.pr_title }}
78+
releaseNotes: ${{ steps.changelog.outputs.changelog }}
6379
file: build/app/outputs/flutter-apk/app-staging-debug.apk
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## ✨ Features",
5+
"labels": [
6+
"type : feature"
7+
]
8+
},
9+
{
10+
"title": "## 🐛 Bug fixes",
11+
"labels": [
12+
"type : bug"
13+
]
14+
},
15+
{
16+
"title": "## 🧹 Chores",
17+
"labels": [
18+
"type : chore"
19+
]
20+
},
21+
{
22+
"title": "## Others",
23+
"exclude_labels": [
24+
"type : feature",
25+
"type : bug",
26+
"type : chore",
27+
"type : release"
28+
]
29+
}
30+
],
31+
"max_pull_requests": 200
32+
}

.github/workflows/ios_deploy_staging_to_firebase.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,25 @@ jobs:
5252
run: |
5353
echo -e "$ENV" > .env.staging
5454
55-
- name: Get PR information
56-
uses: 8BitJonny/gh-get-current-pr@2.2.0
57-
id: PR
55+
- name: Find HEAD commit
56+
id: head
57+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
58+
59+
- name: Limit changelog to the latest pull request only
60+
uses: jossef/action-set-json-field@v2
61+
with:
62+
file: .github/workflows/configs/changelog-config.json
63+
field: max_pull_requests
64+
value: 1
65+
66+
- name: Build changelog on "develop"
67+
id: changelog
68+
uses: mikepenz/release-changelog-builder-action@v4
69+
with:
70+
configuration: ".github/workflows/configs/changelog-config.json"
71+
# Listing PRs from the last tag to the HEAD commit
72+
toTag: ${{ steps.head.outputs.sha }}
73+
token: ${{ secrets.GITHUB_TOKEN }}
5874

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

7187
- name: Deploy to Firebase
7288
env:
73-
RELEASE_NOTE_CONTENT: ${{ steps.PR.outputs.pr_title }}
89+
RELEASE_NOTE_CONTENT: ${{ steps.changelog.outputs.changelog }}
7490
run: |
7591
cd ./ios && bundle exec fastlane build_and_upload_staging_app

bricks/template/__brick__/.github/workflows/android_deploy_production.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,24 @@ jobs:
5151
- name: Build Android apk
5252
run: flutter build apk --flavor production --release --build-number $GITHUB_RUN_NUMBER
5353

54-
- name: Get PR information
55-
uses: 8BitJonny/gh-get-current-pr@2.2.0
56-
id: PR
54+
- name: Find HEAD commit
55+
id: head
56+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
57+
58+
- name: Build changelog on "main"
59+
id: changelog
60+
uses: mikepenz/release-changelog-builder-action@v4
61+
with:
62+
configuration: ".github/workflows/configs/changelog-config.json"
63+
# Listing PRs from the last tag to the HEAD commit
64+
toTag: ${{#mustacheCase}}steps.head.outputs.sha{{/mustacheCase}}
65+
token: ${{#mustacheCase}}secrets.GITHUB_TOKEN{{/mustacheCase}}
5766

5867
- name: Deploy Android Production to Firebase
5968
uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0
6069
with:
6170
appId: ${{#mustacheCase}}vars.FIREBASE_ANDROID_APP_ID{{/mustacheCase}}
6271
serviceCredentialsFileContent: ${{#mustacheCase}}secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON{{/mustacheCase}}
6372
groups: ${{#mustacheCase}}vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS{{/mustacheCase}}
64-
releaseNotes: ${{#mustacheCase}}steps.PR.outputs.pr_body{{/mustacheCase}}
73+
releaseNotes: ${{#mustacheCase}}steps.changelog.outputs.changelog{{/mustacheCase}}
6574
file: build/app/outputs/flutter-apk/app-production-release.apk

bricks/template/__brick__/.github/workflows/android_deploy_staging.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,31 @@ jobs:
4343
- name: Build Android apk
4444
run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER
4545

46-
- name: Get PR information
47-
uses: 8BitJonny/gh-get-current-pr@2.2.0
48-
id: PR
46+
- name: Find HEAD commit
47+
id: head
48+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
49+
50+
- name: Limit changelog to the latest pull request only
51+
uses: jossef/action-set-json-field@v2
52+
with:
53+
file: .github/workflows/configs/changelog-config.json
54+
field: max_pull_requests
55+
value: 1
56+
57+
- name: Build changelog on "develop"
58+
id: changelog
59+
uses: mikepenz/release-changelog-builder-action@v4
60+
with:
61+
configuration: ".github/workflows/configs/changelog-config.json"
62+
# Listing PRs from the last tag to the HEAD commit
63+
toTag: ${{#mustacheCase}}steps.head.outputs.sha{{/mustacheCase}}
64+
token: ${{#mustacheCase}}secrets.GITHUB_TOKEN{{/mustacheCase}}
4965

5066
- name: Deploy Android Staging to Firebase
5167
uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0
5268
with:
5369
appId: ${{#mustacheCase}}vars.FIREBASE_ANDROID_APP_ID{{/mustacheCase}}
5470
serviceCredentialsFileContent: ${{#mustacheCase}}secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON{{/mustacheCase}}
5571
groups: ${{#mustacheCase}}vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS{{/mustacheCase}}
56-
releaseNotes: ${{#mustacheCase}}steps.PR.outputs.pr_title{{/mustacheCase}}
72+
releaseNotes: ${{#mustacheCase}}steps.changelog.outputs.changelog{{/mustacheCase}}
5773
file: build/app/outputs/flutter-apk/app-staging-debug.apk
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## ✨ Features",
5+
"labels": [
6+
"type : feature"
7+
]
8+
},
9+
{
10+
"title": "## 🐛 Bug fixes",
11+
"labels": [
12+
"type : bug"
13+
]
14+
},
15+
{
16+
"title": "## 🧹 Chores",
17+
"labels": [
18+
"type : chore"
19+
]
20+
},
21+
{
22+
"title": "## Others",
23+
"exclude_labels": [
24+
"type : feature",
25+
"type : bug",
26+
"type : chore",
27+
"type : release"
28+
]
29+
}
30+
],
31+
"max_pull_requests": 200
32+
}

bricks/template/__brick__/.github/workflows/ios_deploy_staging_to_firebase.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,25 @@ jobs:
4646
run: |
4747
echo -e "$ENV" > .env.staging
4848
49-
- name: Get PR information
50-
uses: 8BitJonny/gh-get-current-pr@2.2.0
51-
id: PR
49+
- name: Find HEAD commit
50+
id: head
51+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
52+
53+
- name: Limit changelog to the latest pull request only
54+
uses: jossef/action-set-json-field@v2
55+
with:
56+
file: .github/workflows/configs/changelog-config.json
57+
field: max_pull_requests
58+
value: 1
59+
60+
- name: Build changelog on "develop"
61+
id: changelog
62+
uses: mikepenz/release-changelog-builder-action@v4
63+
with:
64+
configuration: ".github/workflows/configs/changelog-config.json"
65+
# Listing PRs from the last tag to the HEAD commit
66+
toTag: ${{#mustacheCase}}steps.head.outputs.sha{{/mustacheCase}}
67+
token: ${{#mustacheCase}}secrets.GITHUB_TOKEN{{/mustacheCase}}
5268

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

6581
- name: Deploy to Firebase
6682
env:
67-
RELEASE_NOTE_CONTENT: ${{ steps.PR.outputs.pr_title }}
83+
RELEASE_NOTE_CONTENT:${{#mustacheCase}}steps.changelog.outputs.changelog{{/mustacheCase}}
6884
run: |
6985
cd ./ios && bundle exec fastlane build_and_upload_staging_app

sample/.github/workflows/android_deploy_production.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,24 @@ jobs:
5151
- name: Build Android apk
5252
run: flutter build apk --flavor production --release --build-number $GITHUB_RUN_NUMBER
5353

54-
- name: Get PR information
55-
uses: 8BitJonny/gh-get-current-pr@2.2.0
56-
id: PR
54+
- name: Find HEAD commit
55+
id: head
56+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
57+
58+
- name: Build changelog on "main"
59+
id: changelog
60+
uses: mikepenz/release-changelog-builder-action@v4
61+
with:
62+
configuration: ".github/workflows/configs/changelog-config.json"
63+
# Listing PRs from the last tag to the HEAD commit
64+
toTag: ${{ steps.head.outputs.sha }}
65+
token: ${{ secrets.GITHUB_TOKEN }}
5766

5867
- name: Deploy Android Production to Firebase
5968
uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0
6069
with:
6170
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
6271
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
6372
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
64-
releaseNotes: ${{ steps.PR.outputs.pr_body }}
65-
file: build/app/outputs/flutter-apk/app-production-debug.apk
73+
releaseNotes: ${{ steps.changelog.outputs.changelog }}
74+
file: build/app/outputs/flutter-apk/app-production-release.apk

sample/.github/workflows/android_deploy_staging.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,31 @@ jobs:
4343
- name: Build Android apk
4444
run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER
4545

46-
- name: Get PR information
47-
uses: 8BitJonny/gh-get-current-pr@2.2.0
48-
id: PR
46+
- name: Find HEAD commit
47+
id: head
48+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
49+
50+
- name: Limit changelog to the latest pull request only
51+
uses: jossef/action-set-json-field@v2
52+
with:
53+
file: .github/workflows/changelog-config.json
54+
field: max_pull_requests
55+
value: 1
56+
57+
- name: Build changelog on "develop"
58+
id: changelog
59+
uses: mikepenz/release-changelog-builder-action@v4
60+
with:
61+
configuration: ".github/workflows/configs/changelog-config.json"
62+
# Listing PRs from the last tag to the HEAD commit
63+
toTag: ${{ steps.head.outputs.sha }}
64+
token: ${{ secrets.GITHUB_TOKEN }}
4965

5066
- name: Deploy Android Staging to Firebase
5167
uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0
5268
with:
5369
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
5470
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
5571
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
56-
releaseNotes: ${{ steps.PR.outputs.pr_title }}
72+
releaseNotes: ${{ steps.changelog.outputs.changelog }}
5773
file: build/app/outputs/flutter-apk/app-staging-debug.apk

0 commit comments

Comments
 (0)