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