github: modify workflow

change short git hash tag.
This commit is contained in:
xiaoyifang 2022-03-15 19:55:23 +08:00
parent 61fb1020b8
commit 8a24a400c9
9 changed files with 19 additions and 77 deletions

View file

@ -28,25 +28,8 @@ on:
jobs:
build:
name: Build
# 运行平台, windows-latest目前是windows server 2019
# 参考文档 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
runs-on: windows-2019
strategy:
# 矩阵配置
matrix:
# qt_ver: [5.15.2,6.2.2]
include:
# 5.15.2 参考 https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/windows_x86/desktop/qt5_5152/
- qt_ver: 5.15.2
qt_arch: win64_msvc2019_64
msvc_arch: x64
qt_target: x64
qt_arch_install: msvc2019_64
# - qt_ver: 6.2.3
# qt_arch: win64_msvc2019_64
# msvc_arch: x64
# qt_target: x64
# qt_arch_install: msvc2019_64
env:
targetName: GoldenDict.exe
version: 22.2.alpha
@ -59,7 +42,7 @@ jobs:
- name: Set outputs
id: githash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
- uses: Klemensas/action-autotag@stable
id: autotag
with:

View file

@ -57,7 +57,7 @@ jobs:
- name: Set outputs
id: githash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
- uses: Klemensas/action-autotag@stable
id: autotag
with:
@ -76,7 +76,7 @@ jobs:
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
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')"

View file

@ -50,17 +50,16 @@ jobs:
sudo xcode-select --print-path
sudo xcode-select --switch /Library/Developer/CommandLineTools
- name: Install Qt
run: |
brew update
brew install qt@6 #qt6.2.3
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
cached: 'false'
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set outputs
id: githash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
fetch-depth: 0
- name: build macos
run: |
@ -75,7 +74,7 @@ jobs:
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
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')"

View file

@ -60,10 +60,6 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set outputs
id: githash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: build macos
@ -79,7 +75,7 @@ jobs:
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
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')"

View file

@ -66,17 +66,6 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set outputs
id: githash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
# - uses: Klemensas/action-autotag@stable
# id: autotag
# with:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# tag_prefix: "v"
# tag_suffix: "-${{ steps.githash.outputs.sha_short }}"
- name: build goldendict
run: |
@ -97,7 +86,7 @@ jobs:
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
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')"

View file

@ -64,18 +64,7 @@ jobs:
cd ..
- uses: actions/checkout@v3
with:
fetch-depth: 0
# - run: |
# short_sha=$(git rev-parse --short HEAD)
# tagname=v$version-$short_sha
# echo $tagname
# git tag $tagname -f
# git push origin $tagname
- name: Set git short sha
id: githash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
fetch-depth: 0
- name: build goldendict
run: |
@ -93,7 +82,7 @@ jobs:
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
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')"

View file

@ -72,22 +72,12 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set outputs
id: githash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
# - uses: Klemensas/action-autotag@stable
# id: autotag
# with:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# tag_prefix: "v"
# tag_suffix: "-${{ steps.githash.outputs.sha_short }}"
- name: Set outputs
id: vars
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
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')"

View file

@ -71,16 +71,12 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set outputs
id: githash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Set outputs
id: vars
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
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')"

View file

@ -10,7 +10,7 @@ VERSION = 22.2.alpha
system(git describe --tags --always --dirty): hasGit=1
!isEmpty(hasGit){
GIT_HASH=$$system(git rev-parse --short HEAD )
GIT_HASH=$$system(git rev-parse --short=8 HEAD )
}
system(echo $${VERSION}.$${GIT_HASH} > version.txt)