mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-18 10:00:48 +08:00
Update ci.yml (#7778)
This commit is contained in:
parent
81f0d5f33e
commit
5500cdebae
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@ -28,14 +28,19 @@ jobs:
|
||||
|
||||
- name: Gather Release Information
|
||||
id: release_info
|
||||
# 注意:创建或更新环境变量的步骤无权访问新值;$GITHUB_OUTPUT 需要定义步骤 id 才能稍后检索输出值,$GITHUB_ENV 则不需要
|
||||
# 以下转换不再需要:
|
||||
# changelog="${changelog//'%'/'%25'}"
|
||||
# changelog="${changelog//$'\n'/'%0A'}"
|
||||
# changelog="${changelog//$'\r'/'%0D'}"
|
||||
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')"
|
||||
echo "release_title=$(git show --format=%s --no-patch | head -1)" >> $GITHUB_OUTPUT
|
||||
echo "release_version=$(TZ=Asia/Shanghai date +'v%Y%m%d%H%M')" >> $GITHUB_OUTPUT
|
||||
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"
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "release_body<<$EOF" >> $GITHUB_ENV
|
||||
echo "$changelog" >> $GITHUB_ENV
|
||||
echo "$EOF" >> $GITHUB_ENV
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@ -53,7 +58,7 @@ jobs:
|
||||
with:
|
||||
release_name: ${{ steps.release_info.outputs.release_version }}
|
||||
tag_name: ${{ github.ref }}
|
||||
body: ${{ steps.release_info.outputs.release_body }}
|
||||
body: ${{ env.release_body }}
|
||||
draft: false
|
||||
prerelease: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user