Skip to content

Commit

Permalink
release版本的日志自动获取自更新日志文件
Browse files Browse the repository at this point in the history
  • Loading branch information
AoEiuV020 committed Sep 19, 2021
1 parent 0f4b526 commit 74c5c56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: init custom env
run: |
BUILD_NAME="${GITHUB_REPOSITORY#*/}"
Expand All @@ -26,7 +27,7 @@ jobs:
echo CREATE_RELEASE="true" >> .custom_env
BUILD_VERSION=${GITHUB_REF#refs/tags/}
echo 'RELEASE_BODY<<EOF' >> .custom_env
echo '${{ github.event.head_commit.message }}' >> .custom_env
./latest-changelog.sh >> .custom_env
echo 'EOF' >> .custom_env
elif [[ ${GITHUB_REF} == refs/pull* ]]
then
Expand All @@ -47,7 +48,6 @@ jobs:
echo BUILD_NAME_WITH_VERSION="$BUILD_NAME_WITH_VERSION" >> .custom_env
cat .custom_env
cat .custom_env >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
Expand Down
7 changes: 7 additions & 0 deletions latest-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
# 打印最新版本的更新日志,
# 关键是以markdown的格式加粗第一行,
set -e
old=$PWD
cd $(dirname $0)
cat app/src/main/assets/ChangeLog.txt |sed -n '/3.4.4:/,$p' |sed '/^$/,$d;1d' |sed '1s/,$//;1s/^\(.*\)$/### \1\n/'

0 comments on commit 74c5c56

Please sign in to comment.