diff --git a/.github/changelog-configuration.json b/.github/changelog-configuration.json new file mode 100644 index 0000000000..f163ae129b --- /dev/null +++ b/.github/changelog-configuration.json @@ -0,0 +1,32 @@ +{ + "categories": [ + { + "title": "## 💡 Features", + "labels": [ + "feature", + "enhancement" + ] + }, + { + "title": "## 🐛 Fixes", + "labels": [ + "fix", + "bug" + ] + }, + { + "title": "## 💬 Maintenance", + "labels": [ + "maintenance" + ] + } + ], + "ignore_labels": [ + "dependencies", + "gradle-wrapper" + ], + "sort": "ASC", + "template": "${{CHANGELOG}}", + "pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}", + "empty_template": "- no changes" +} diff --git a/.github/workflows/Android-CI-release.yml b/.github/workflows/Android-CI-release.yml index e6fca00a24..1afa0bde4a 100644 --- a/.github/workflows/Android-CI-release.yml +++ b/.github/workflows/Android-CI-release.yml @@ -19,17 +19,32 @@ jobs: with: distribution: "adopt" java-version: 11 + - name: Build Changelog + id: github_release + uses: mikepenz/release-changelog-builder-action@main + with: + configuration: ".github/changelog-configuration.json" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get the version + id: tagger + uses: jimschubert/query-tag-action@v2 + with: + skip-unshallow: 'true' + abbrev: false + commit-ish: HEAD - name: Install Android SDK uses: malinskiy/action-android/install-sdk@release/0.1.2 - name: Build project run: ./gradlew clean build env: VERSION: ${{ github.ref }} - - run: | - assetsAAR=$(find . -name *release.aar | while read -r asset ; do echo "-a $asset" ; done) - VERSION=$(echo $VERSION | cut -d'/' -f3) - tag_name="${GITHUB_REF##*/}" - hub release create ${assetsAAR} -m "$tag_name" "$tag_name" + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{steps.tagger.outputs.tag}} + name: ${{steps.tagger.outputs.tag}} + body: ${{steps.github_release.outputs.changelog}} + files: MPChartLib/build/outputs/aar/MPChartLib-release.aar env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: ${{ github.ref }}