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] qt_arch: [clang_64]
env: env:
targetName: GoldenDict targetName: GoldenDict
version: 24.02.16 version: 24.05.05
version-suffix: alpha version-suffix: alpha
prerelease: true prerelease: true
steps: steps:

View file

@ -27,7 +27,7 @@ jobs:
qt_arch: [clang_64] qt_arch: [clang_64]
env: env:
targetName: GoldenDict targetName: GoldenDict
version: 24.02.16 version: 24.05.05
version-suffix: ${{ !contains(github.ref_name,'master') && 'alpha' || 'LiXia' }} version-suffix: ${{ !contains(github.ref_name,'master') && 'alpha' || 'LiXia' }}
prerelease: ${{ !contains(github.ref_name,'master') }} prerelease: ${{ !contains(github.ref_name,'master') }}
steps: steps:
@ -81,12 +81,23 @@ jobs:
cmake --install build_dir/ cmake --install build_dir/
- name: changelog - name: changelog
id: changelog id: changelog
env:
prerelease: ${{env.prerelease}}
run: | run: |
previousTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 2p) if [[ "$prerelease" == 'true' ]]
echo "previousTag : $previousTag" 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 "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 - name: Set outputs
id: vars id: vars

View file

@ -56,12 +56,23 @@ jobs:
- name: changelog - name: changelog
id: changelog id: changelog
shell: bash shell: bash
env:
prerelease: ${{env.prerelease}}
run: | run: |
previousTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 2p) if [[ "$prerelease" == 'true' ]]
echo "previousTag : $previousTag" 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 "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" - name: "Build Changelog"
id: build_changelog id: build_changelog