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 - uses: actions/checkout@v3
with: with:
fetch-depth: 1 fetch-depth: 0
- name: Set outputs - name: Set outputs
id: githash id: githash
run: | run: |
@ -296,12 +296,14 @@ jobs:
mv ${targetName}.app ./tmp mv ${targetName}.app ./tmp
# --background "installer_background.png" # --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/ 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 - name: Release Changelog Builder
if: ${{!env.prerelease}} id: changelog
id: changelog1 uses: mikepenz/release-changelog-builder-action@v3.5.0
uses: metcalfc/changelog-generator@v3.0.0 env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
myToken: ${{ secrets.GITHUB_TOKEN }} # ignorePreReleases: true
commitMode: true
- name: Set outputs - name: Set outputs
id: vars id: vars
@ -312,20 +314,6 @@ jobs:
echo "::set-output name=release_time_clock::$(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')" 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 # tag 上传Release
- name: uploadRelease - name: uploadRelease
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
@ -355,5 +343,4 @@ jobs:
Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]**
CHANGES: CHANGES:
${{ steps.changelog1.outputs.changelog }} ${{ steps.changelog.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}