diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6da50bf..ea5e0d7 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -107,9 +107,9 @@ jobs: previousTag=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`) lastTag=$(git describe --abbrev=0 --tags) echo "previousTag:$previousTag ~ lastTag:$lastTag" - log=$(git log $previousTag..$lastTag --pretty=format:'- %cd **%an**: %s' --date=format:'%Y-%m-%d %H:%M:%S') + log=$(git log $previousTag..$lastTag --pretty=format:'- %cd %an: %s\n' --date=format:'%Y-%m-%d %H:%M:%S') echo "$log" - echo "::set-output name=log::$log" + echo "::set-output name=log::"$log"" # 显示信息 - name: Show info @@ -118,10 +118,10 @@ jobs: echo '${{ steps.Core-path.outputs.path }}' # Core aar路径 echo '${{ steps.Helper-path.outputs.path }}' # Helper aar路径 echo '${{ steps.EpoxyHelper-path.outputs.path }}' # EpoxyHelper aar路径 - echo '${{ steps.apk-path.outputs.path }}' # apk路径 + echo '${{ steps.apk-path.outputs.path }}' echo '${{ steps.apk-info.outputs.result }}' # get apk info success or failure - echo '${{ steps.time.outputs.time }}' # time - echo '${{ steps.git-log.outputs.log }}' # git log + echo '${{ steps.time.outputs.time }}' + echo '${{ steps.git-log.outputs.log }}' echo '${{ steps.apk-info.outputs.application-name }}' echo '${{ steps.apk-info.outputs.application-id }}' echo '${{ steps.apk-info.outputs.version-code }}' @@ -146,13 +146,26 @@ jobs: payload: '{"msgtype": "text", "text": {"content": "版本更新: ${{ steps.apk-info.outputs.application-name }}-版本号: ${{ steps.apk-info.outputs.version-name }} \n 编译时间: ${{ steps.time.outputs.time }} \n 距上个正式版的更新记录: \n${{ steps.git-log.outputs.log }}"}}' headers: '{"Content-Type": "application/json"}' - # 创建Release + # 创建Changelog文件 triggered by git tag push, + - name: Generate Changelog + if: startsWith(github.ref, 'refs/tags/') + run: | + echo -e '${{ steps.git-log.outputs.log }}' > Release.txt + + # Cat Changelog triggered by git tag push + - name: Cat Changelog + if: startsWith(github.ref, 'refs/tags/') + run: | + cat Release.txt + + # 创建Release triggered by git tag push, # https://github.com/marketplace/actions/gh-release - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - body: ${{ steps.git-log.outputs.log }} + body_path: Release.txt + draft: true files: | ${{ steps.apk-path.outputs.path }} ${{ steps.Core-path.outputs.path }} diff --git a/README.md b/README.md index 09b4090..4ab5c10 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ ### Introduction SwipeMenuLayout is an Android side-sliding menu widget. + It supports swipe left (right menu) or swipe right (left menu), and can be used in RecyclerView, support long press drag and drop. -demo implementation: Kotlin+epoxy+Mavericks -[Mavericks](https://github.com/airbnb/mavericks) -[epoxy](https://github.com/airbnb/epoxy) + +demo implementation: Kotlin + [epoxy](https://github.com/airbnb/epoxy) + [Mavericks](https://github.com/airbnb/mavericks) #### Demo Picture ##### Simple example @@ -36,12 +36,13 @@ repositories { 3. RecyclerView+Epoxy,dependency: All ```groovy dependencies { + def swipe_version = "1.0.3" //Widget - implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Core:1.0.2' + implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Core:$swipe_version" //Adapter Helper - implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Helper:1.0.2' + implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Helper:$swipe_version" //Epoxy Helper - implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-EpoxyHelper:1.0.2' + implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-EpoxyHelper:$swipe_version" } ``` diff --git a/README_zh.md b/README_zh.md index 0208884..05fada3 100644 --- a/README_zh.md +++ b/README_zh.md @@ -7,10 +7,10 @@ ### 介绍 SwipeMenuLayout是一个Android侧滑菜单控件。 + 支持向左滑动(右侧菜单)或向右滑动(左侧菜单),并可用于RecyclerView,支持长按拖拽排序。 -demo实现:Kotlin+epoxy+Mavericks -[Mavericks](https://github.com/airbnb/mavericks) -[epoxy](https://github.com/airbnb/epoxy) + +demo实现:Kotlin + [epoxy](https://github.com/airbnb/epoxy) + [Mavericks](https://github.com/airbnb/mavericks) #### 演示效果图 ##### 单独使用 @@ -36,12 +36,13 @@ repositories { 3. 在RecyclerView+Epoxy中使用时,需要全部3个 ```groovy dependencies { + def swipe_version = "1.0.3" //Widget - implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Core:1.0.2' + implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Core:$swipe_version" //Adapter Helper - implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Helper:1.0.2' + implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Helper:$swipe_version" //Epoxy Helper - implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-EpoxyHelper:1.0.2' + implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-EpoxyHelper:$swipe_version" } ``` diff --git a/app/build.gradle b/app/build.gradle index e67052e..38d97aa 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -88,9 +88,10 @@ dependencies { implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version" implementation "androidx.navigation:navigation-ui-ktx:$navigation_version" - //implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Core:1.0.2' - //implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Helper:1.0.2' - //implementation 'com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-EpoxyHelper:1.0.2' + //def swipe_version = "1.0.3" + //implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Core:$swipe_version" + //implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-Helper:$swipe_version" + //implementation "com.github.benjaminwan.SwipeMenuLayout:SwipeMenuLayout-EpoxyHelper:$swipe_version" implementation project(':SwipeMenuLayout-Core') implementation project(':SwipeMenuLayout-Helper') implementation project(':SwipeMenuLayout-EpoxyHelper') diff --git a/build.gradle b/build.gradle index 110fbbd..5f4500e 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,8 @@ buildscript { ext.compile_SdkVersion = 30 ext.min_SdkVersion = 21 ext.target_SdkVersion = 30 - ext.project_versionCode = 3 - ext.project_versionName = "1.0.2" + ext.project_versionCode = 5 + ext.project_versionName = "1.0.3" repositories { google() jcenter()