action:change log

This commit is contained in:
xiaoyifang 2022-12-14 09:29:09 +08:00
parent 784edee946
commit 77aa253222

View file

@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 1
fetch-depth: 0
- name: Set outputs
id: githash
run: |
@ -296,12 +296,14 @@ jobs:
mv ${targetName}.app ./tmp
# --background "installer_background.png"
create-dmg --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/
- name: Generate changelog
if: ${{!env.prerelease}}
id: changelog1
uses: metcalfc/changelog-generator@v3.0.0
- name: Release Changelog Builder
id: changelog
uses: mikepenz/release-changelog-builder-action@v3.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
# ignorePreReleases: true
commitMode: true
- name: Set outputs
id: vars
@ -311,21 +313,7 @@ jobs:
echo "::set-output name=release_time::$(date +'%H%M%S')"
echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')"
echo "::set-output name=release_hm::$(date +'%y%m%d')"
- name: changelog
if: $${{env.prerelease}}
id: changelog2
run: |
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
CHANGELOG="${CHANGELOG//'\"'/'%22'}"
CHANGELOG="${CHANGELOG//"'"/ }"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
# tag 上传Release
- name: uploadRelease
uses: svenstaro/upload-release-action@v2
@ -355,5 +343,4 @@ jobs:
Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]**
CHANGES:
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}
${{ steps.changelog.outputs.changelog }}