优化pre-release主体信息 (#5063)

* :octocat: improve the body of release information https://github.com/siyuan-note/siyuan/issues/5062

* :octocat: not match `Widget` milestone https://github.com/siyuan-note/siyuan/issues/5062
This commit is contained in:
飘尘 2022-06-01 09:21:53 +08:00 committed by GitHub
parent ae6fdd3abc
commit e85f7a55cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 92 additions and 26 deletions

View file

@ -24,17 +24,20 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.10"
- run: pip install PyGithub
- name: Gather Release Information
id: release_info
run: |
echo "::set-output name=release_title::$(git show --format=%s --no-patch | head -1)"
echo "::set-output name=release_version::$(TZ=Asia/Shanghai date +'v%Y%m%d%H%M')"
changelog=$(python scripts/parse-changelog.py CHANGE_LOGS.md)
changelog=$(python scripts/parse-changelog.py -t ${{ github.ref }} siyuan-note/siyuan)
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"
echo "::set-output name=release_body::$changelog"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from package.json
uses: sergeysova/jq-action@v2
@ -50,7 +53,7 @@ jobs:
with:
release_name: ${{ steps.release_info.outputs.release_version }}
tag_name: ${{ github.ref }}
body: ${{ github.ref }}
body: ${{ steps.release_info.outputs.release_body }}
draft: false
prerelease: true