Skip to content

Commit d1cb2af

Browse files
committed
feat(build): generate ChangeLog from ConventionalCommit
1 parent 8053cee commit d1cb2af

File tree

6 files changed

+2377
-24
lines changed

6 files changed

+2377
-24
lines changed

.github/release.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/release-new-version.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,22 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: "Extract tag name"
18-
run: |
19-
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
20-
- uses: actions/checkout@v3
17+
- name: Fetch repository
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0 #To Fetch All Tags and Branches
21+
22+
- name: Install dependencies
23+
uses: php-actions/composer@v6
24+
with:
25+
dev: no
26+
27+
- name: "Extract current tag name"
28+
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
29+
30+
- name: Extract previous tag name
31+
run: echo "previous_tag_name=$(git tag --sort=taggerdate | tail -1)" >> $GITHUB_ENV
32+
2133
- name: set up JDK 11
2234
uses: actions/setup-java@v3
2335
with:
@@ -32,19 +44,27 @@ jobs:
3244
- name: Grant execute permission for gradlew
3345
run: chmod +x gradlew
3446
# Build app
35-
- name: Build with Gradle
47+
- name: Build project APK / AAR / JAR
3648
run: ./gradlew build
3749

3850
#####################
3951
# Prepare release #
4052
#####################
53+
- name: "Extract clean git log (conventianl commits)"
54+
run: |
55+
{
56+
echo 'release_body<<EOF'
57+
./vendor/bin/robo build:log ${{ env.previous_tag_name }} HEAD 0
58+
echo EOF
59+
} >> "$GITHUB_ENV"
60+
4161
- name: Release
4262
uses: softprops/action-gh-release@v1
4363
if: startsWith(github.ref, 'refs/tags/')
4464
with:
4565
name : Inventory Engine v${{ env.tag_name }}
4666
draft : true
47-
generate_release_notes : true
67+
body : ${{ env.release_body }}
4868
files: |
4969
${{ env.module_java }}/build/outputs/apk/release/${{ env.module_java }}-release-unsigned.apk
5070
${{ env.module_kotlin }}/build/outputs/apk/release/${{ env.module_kotlin }}-release-unsigned.apk

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ node_modules
6262
/captures
6363
.externalNativeBuild
6464
/development
65+
66+
/vendor/*

0 commit comments

Comments
 (0)