Merge pull request #99 from xiaoyifang/feature/github-action-release

github: add release changelog
This commit is contained in:
xiaoyifang 2022-06-14 07:41:22 +08:00 committed by GitHub
commit 5259be69e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 99 additions and 19 deletions

View file

@ -74,6 +74,13 @@ 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
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Set outputs
id: vars
run: |
@ -82,6 +89,11 @@ 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"
@ -91,7 +103,7 @@ jobs:
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
CHANGELOG="${CHANGELOG//'\"'/'%22'}"
CHANGELOG="${CHANGELOG//"'"/ }"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
# tag 上传Release
- name: uploadRelease
uses: svenstaro/upload-release-action@v2
@ -119,4 +131,5 @@ jobs:
auto built by github action. use on your on risk:-)
CHANGES:
${{ steps.vars.outputs.COMMIT_SUMMARY }}
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}

View file

@ -75,7 +75,12 @@ 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
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Set outputs
id: vars
@ -85,6 +90,11 @@ 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"
@ -122,4 +132,5 @@ jobs:
auto built by github action. use on your on risk:-)
CHANGES:
${{ steps.vars.outputs.COMMIT_SUMMARY }}
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}

View file

@ -80,15 +80,26 @@ jobs:
# with:
# name: AppImage
# path: './*.AppImage*'
- 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
run: |
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
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=appname::$(ls *.AppImage*)"
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"
@ -98,7 +109,7 @@ jobs:
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
CHANGELOG="${CHANGELOG//'\"'/'%22'}"
CHANGELOG="${CHANGELOG//"'"/ }"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
- name: uploadRelease
# if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
@ -126,4 +137,5 @@ jobs:
auto built by github action. use on your on risk:-)
CHANGES:
${{ steps.vars.outputs.COMMIT_SUMMARY }}
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}

View file

@ -77,15 +77,26 @@ 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
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
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=appname::$(ls *.AppImage*)"
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"
@ -95,7 +106,7 @@ jobs:
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
CHANGELOG="${CHANGELOG//'\"'/'%22'}"
CHANGELOG="${CHANGELOG//"'"/ }"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
- name: uploadRelease
# if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
@ -123,4 +134,5 @@ jobs:
auto built by github action. use on your on risk:-)
CHANGES:
${{ steps.vars.outputs.COMMIT_SUMMARY }}
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}

View file

@ -52,15 +52,28 @@ 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
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
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_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"
@ -70,7 +83,7 @@ jobs:
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
CHANGELOG="${CHANGELOG//'\"'/'%22'}"
CHANGELOG="${CHANGELOG//"'"/ }"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
# # msvc编译
- uses: ilammy/msvc-dev-cmd@v1
@ -128,6 +141,11 @@ jobs:
Qt6.X(Universal Build)
Qt5.15.2(Intel Kind)
auto built by github action. use on your on risk:-)
CHANGES:
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}
- name: upload goldendict.exe only
# if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2

View file

@ -54,15 +54,28 @@ 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
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
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_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"
@ -72,7 +85,7 @@ jobs:
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
CHANGELOG="${CHANGELOG//'\"'/'%22'}"
CHANGELOG="${CHANGELOG//"'"/ }"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
- uses: ilammy/msvc-dev-cmd@v1
# msvc编译
- name: msvc-build goldendict
@ -127,7 +140,8 @@ jobs:
auto built by github action. use on your on risk:-)
CHANGES:
${{ steps.vars.outputs.COMMIT_SUMMARY }}
${{ steps.changelog1.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}
- name: upload goldendict.exe only
# if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2