🎨 更新 parse-changelog 工作流 (#11289)

This commit is contained in:
绛亽 2024-05-07 22:13:59 +08:00 committed by GitHub
parent 291a083378
commit 5095d836c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 135 additions and 74 deletions

View file

@ -29,10 +29,10 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- run: pip install PyGithub
- id: thislatestR
- id: thisLatestRelease
uses: pozetroninc/github-action-get-latest-release@master
with:
# owner: siyuan-note
@ -46,9 +46,11 @@ jobs:
run: |
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 }} -b ${{ steps.thislatestR.outputs.release }} ${{ env.repo_owner }}/${{ env.repo_name }})
changelog_header=$(python scripts/parse-changelog-HEAD.py -t ${{ github.ref }} -b ${{ steps.thisLatestRelease.outputs.release }} ${{ env.repo_owner }}/${{ env.repo_name }})
changelog=$(python scripts/parse-changelog.py -t ${{ github.ref }} ${{ env.repo_owner }}/${{ env.repo_name }})
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "release_body<<$EOF" >> $GITHUB_ENV
echo "$changelog_header" >> $GITHUB_ENV
echo "$changelog" >> $GITHUB_ENV
echo "$EOF" >> $GITHUB_ENV
env: