Merge pull request #253 from xiaoyifang/feature/changelog

action:changelog
This commit is contained in:
xiaoyifang 2022-12-13 21:43:22 +08:00 committed by GitHub
commit 9f6c98eddd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 60 additions and 158 deletions

View file

@ -78,12 +78,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
@ -94,20 +96,6 @@ jobs:
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
@ -137,5 +125,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 }}

View file

@ -82,12 +82,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
@ -97,21 +99,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
@ -141,5 +129,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 }}

View file

@ -87,12 +87,14 @@ jobs:
chmod a+x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.goldendict.GoldenDict.desktop
- 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
@ -103,21 +105,7 @@ jobs:
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=appname::$(ls *.AppImage*)"
- 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")"
- name: uploadRelease
# if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
@ -147,5 +135,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 }}

View file

@ -83,13 +83,14 @@ jobs:
chmod a+x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.goldendict.GoldenDict.desktop
- 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
run: |
@ -100,20 +101,6 @@ jobs:
echo "::set-output name=release_hm::$(date +'%y%m%d')"
echo "::set-output name=appname::$(ls *.AppImage*)"
- 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")"
- name: uploadRelease
# if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
@ -143,5 +130,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 }}

View file

@ -51,13 +51,14 @@ jobs:
with:
fetch-depth: 0
- 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
shell: bash
@ -66,23 +67,7 @@ jobs:
echo "::set-output name=release_date::$(date +'%Y%m%d')"
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
shell: bash
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")"
echo "::set-output name=release_hm::$(date +'%y%m%d')"
- name: version-file
shell: bash
@ -152,8 +137,7 @@ jobs:
Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]**
CHANGES:
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}
${{ steps.changelog.outputs.changelog }}
- name: upload goldendict.exe only
# if: startsWith(github.event.ref, 'refs/tags/')

View file

@ -51,12 +51,6 @@ jobs:
with:
fetch-depth: 0
- name: Generate changelog
if: ${{!env.prerelease}}
id: changelog1
uses: metcalfc/changelog-generator@v3.0.0
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Set outputs
id: vars
@ -68,21 +62,14 @@ jobs:
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
shell: bash
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")"
- name: Release Changelog Builder
id: changelog
uses: mikepenz/release-changelog-builder-action@v3.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# ignorePreReleases: true
commitMode: true
- name: version-file
shell: bash
@ -149,8 +136,7 @@ jobs:
Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]**
CHANGES:
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}
${{ steps.changelog.outputs.changelog }}
- name: upload goldendict.exe only
# if: startsWith(github.event.ref, 'refs/tags/')

View file

@ -54,12 +54,14 @@ jobs:
with:
fetch-depth: 0
- 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
@ -71,22 +73,6 @@ jobs:
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
shell: bash
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")"
- name: version-file
shell: bash
run: |
@ -149,8 +135,7 @@ jobs:
Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]**
CHANGES:
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}
${{ steps.changelog.outputs.changelog }}
- name: upload goldendict.exe only
# if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2