Skip to content

Commit 112c756

Browse files
committed
chore(release): standardize zip naming and restore git-cliff with full history
1 parent 164451c commit 112c756

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

.github/workflows/android.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v4
2929
with:
30-
fetch-depth: 2
30+
fetch-depth: 0
3131
- name: Get version
3232
id: get_version
3333
run: |
@@ -101,15 +101,23 @@ jobs:
101101
name: ZygiskLoader-Release
102102
path: out
103103

104+
- name: Generate Changelog
105+
uses: orhun/git-cliff-action@v4
106+
id: git_cliff
107+
with:
108+
config: .github/external/cliff.toml
109+
args: --verbose --unreleased --tag v${{ needs.check-version.outputs.version }} --strip all
110+
env:
111+
OUTPUT: CHANGELOG.md
112+
104113
- name: Create Release
105114
uses: softprops/action-gh-release@v2
106115
with:
107-
tag_name: v${{ needs.check_version.outputs.version }}
108-
name: Release v${{ needs.check_version.outputs.version }}
109-
body: "See update.json for changelog."
116+
tag_name: v${{ needs.check-version.outputs.version }}
117+
name: Release v${{ needs.check-version.outputs.version }}
118+
body: ${{ steps.git_cliff.outputs.content }}
110119
files: out/*.zip
111120
draft: false
112121
prerelease: false
113122
env:
114123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115-

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
1.1.0
2+

module/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ androidComponents {
4242
}.join(" ")
4343

4444
def moduleDir = layout.buildDirectory.file("outputs/module/$variantLowered")
45-
def zipFileName = "${rootProject.moduleName}-v${rootProject.verName}.${rootProject.verCode}-${rootProject.commitHash}-${buildTypeLowered}.zip".replace(' ', '-')
45+
def zipFileName
46+
if (buildTypeLowered == "release") {
47+
zipFileName = "${rootProject.moduleId}-v${rootProject.verName}-release.zip"
48+
} else {
49+
zipFileName = "${rootProject.moduleId}-v${rootProject.verName}.${rootProject.verCode}-${rootProject.commitHash}-${buildTypeLowered}.zip"
50+
}
4651

4752
afterEvaluate {
4853
def prepareModuleFilesTask = tasks.register("prepareModuleFiles$variantCapped", Sync) {

0 commit comments

Comments
 (0)