add year month hour minute to version

This commit is contained in:
xiaoyifang 2022-04-08 00:08:21 +08:00
parent 7390299af8
commit 5ed58d4daf
8 changed files with 19 additions and 17 deletions

View file

@ -39,13 +39,14 @@ jobs:
- name: set git short sha
id: git
run: |
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
echo "::set-output name=release_hm::$(date +'%y%m%d%H%M')"
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{env.version}}-${{ steps.git.outputs.sha_short }}
custom_tag: ${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}

View file

@ -91,7 +91,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%H%M')"
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
@ -107,7 +107,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.targetName }}.dmg
asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{ steps.vars.outputs.sha_short }}.dmg
tag: v${{env.version}}-${{ steps.vars.outputs.sha_short }}
tag: v${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
overwrite: true
release_name: win-linux-macos-${{steps.vars.outputs.release_date}}
prerelease: true

View file

@ -104,6 +104,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%H%M')"
# tag 上传Release
# - name: uploadRelease
# uses: svenstaro/upload-release-action@v2
@ -111,7 +112,7 @@ jobs:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: ${{ env.targetName }}.dmg
# asset_name: ${{ env.targetName }}-M1_${{ matrix.os }}_${{ matrix.qt_ver }}_${{ steps.vars.outputs.sha_short }}.dmg
# tag: v${{ steps.autotag.outputs.version }}-${{ steps.vars.outputs.sha_short }}
# tag: v${{ steps.autotag.outputs.version }}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
# overwrite: true
# release_name: win-ubuntu-macos-${{ github.ref_name }}-${{steps.vars.outputs.release_date}}
# prerelease: true

View file

@ -93,7 +93,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%H%M')"
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
@ -109,7 +109,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.targetName }}.dmg
asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{ steps.vars.outputs.sha_short }}.dmg
tag: v${{env.version}}-${{ steps.vars.outputs.sha_short }}
tag: v${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
overwrite: true
release_name: win-linux-macos-${{steps.vars.outputs.release_date}}
prerelease: true

View file

@ -95,7 +95,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=appname::$(ls *.AppImage*)"
echo "::set-output name=release_hm::$(date +'%y%m%d%H%M')"
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
@ -111,7 +111,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.vars.outputs.appname }}
asset_name: ${{ matrix.qt_ver }}-${{ steps.vars.outputs.appname }}
tag: v${{env.version}}-${{ steps.vars.outputs.sha_short }}
tag: v${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
overwrite: true
release_name: win-linux-macos-${{steps.vars.outputs.release_date}}
prerelease: true

View file

@ -92,7 +92,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=appname::$(ls *.AppImage*)"
echo "::set-output name=release_hm::$(date +'%y%m%d%H%M')"
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
@ -108,7 +108,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.vars.outputs.appname }}
asset_name: ${{ matrix.qt_ver }}-${{ steps.vars.outputs.appname }}
tag: v${{env.version}}-${{ steps.vars.outputs.sha_short }}
tag: v${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
overwrite: true
release_name: win-linux-macos-${{steps.vars.outputs.release_date}}
prerelease: true

View file

@ -78,7 +78,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%H%M')"
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
@ -131,7 +131,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.package.outputs.packageName }}.zip
asset_name: ${{ matrix.qt_ver }}-${{ steps.package.outputs.packageName }}.zip
tag: v${{env.version}}-${{ steps.vars.outputs.sha_short }}
tag: v${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
overwrite: true
release_name: win-linux-macos-${{steps.vars.outputs.release_date}}
prerelease: true
@ -151,7 +151,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/${{ env.targetName }}
asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}
tag: v${{env.version}}-${{ steps.vars.outputs.sha_short }}
tag: v${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
overwrite: true
release_name: win-linux-macos-${{steps.vars.outputs.release_date}}
prerelease: true

View file

@ -74,7 +74,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%H%M')"
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
@ -123,7 +123,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.package.outputs.packageName }}.zip
asset_name: ${{ matrix.qt_ver }}-${{ steps.package.outputs.packageName }}.zip
tag: v${{env.version}}-${{ steps.vars.outputs.sha_short }}
tag: v${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
overwrite: true
release_name: win-linux-macos-${{steps.vars.outputs.release_date}}
prerelease: true
@ -148,7 +148,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/${{ env.targetName }}
asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}
tag: v${{env.version}}-${{ steps.vars.outputs.sha_short }}
tag: v${{env.version}}.${{ steps.git.outputs.release_hm }}.${{ steps.git.outputs.sha_short }}
overwrite: true
release_name: win-linux-macos-${{steps.vars.outputs.release_date}}
prerelease: true