Merge pull request #1502 from xiaoyifang/staged

cut a release, really
This commit is contained in:
shenleban tongying 2024-05-05 10:25:18 -04:00 committed by GitHub
commit ecd1138cfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 10 deletions

View file

@ -26,7 +26,7 @@ jobs:
qt_arch: [clang_64]
env:
targetName: GoldenDict
version: 24.02.16
version: 24.05.05
version-suffix: alpha
prerelease: true
steps:

View file

@ -27,7 +27,7 @@ jobs:
qt_arch: [clang_64]
env:
targetName: GoldenDict
version: 24.02.16
version: 24.05.05
version-suffix: ${{ !contains(github.ref_name,'master') && 'alpha' || 'LiXia' }}
prerelease: ${{ !contains(github.ref_name,'master') }}
steps:
@ -81,12 +81,23 @@ jobs:
cmake --install build_dir/
- name: changelog
id: changelog
env:
prerelease: ${{env.prerelease}}
run: |
previousTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 2p)
echo "previousTag : $previousTag"
if [[ "$prerelease" == 'true' ]]
then
echo "This is a pre-release"
previousTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 2p)
currentTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 1p)
else
echo "This is not a pre-release"
previousTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | sed -n 2p)
currentTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | sed -n 1p)
fi
echo "prev_tag=$previousTag" >> $GITHUB_OUTPUT
echo "curr_tag=$(git tag --sort=-creatordate | grep "^v" | sed -n 1p)" >> $GITHUB_OUTPUT
echo "curr_tag=$currentTag" >> $GITHUB_OUTPUT
echo "previousTag : $previousTag"
echo "currentTag : $currentTag"
- name: Set outputs
id: vars

View file

@ -56,12 +56,23 @@ jobs:
- name: changelog
id: changelog
shell: bash
env:
prerelease: ${{env.prerelease}}
run: |
previousTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 2p)
echo "previousTag : $previousTag"
if [[ "$prerelease" == 'true' ]]
then
echo "This is a pre-release"
previousTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 2p)
currentTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 1p)
else
echo "This is not a pre-release"
previousTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | sed -n 2p)
currentTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | sed -n 1p)
fi
echo "prev_tag=$previousTag" >> $GITHUB_OUTPUT
echo "curr_tag=$(git tag --sort=-creatordate | grep "^v" | sed -n 1p)" >> $GITHUB_OUTPUT
echo "curr_tag=$currentTag" >> $GITHUB_OUTPUT
echo "previousTag : $previousTag"
echo "currentTag : $currentTag"
- name: "Build Changelog"
id: build_changelog