Skip to content

Commit ca5bdee

Browse files
authored
feat: Support VERSION file and auto release (#130)
Use VERSION file to manage DTK version. Add auto release workflow. Signed-off-by: Yixue Wang <wangyixue@uniontech.com>
1 parent f3769d4 commit ca5bdee

6 files changed

Lines changed: 57 additions & 2 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Auto Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Release version (e.g., 1.0.0)'
7+
type: string
8+
required: true
9+
name:
10+
description: 'The name of the person to release the version'
11+
type: string
12+
required: false
13+
email:
14+
description: 'The email of the person to release the version'
15+
type: string
16+
required: false
17+
timezone:
18+
description: 'The timezone in the debian changelog file'
19+
required: false
20+
type: string
21+
default: 'Asia/Shanghai'
22+
workflow_call:
23+
inputs:
24+
version:
25+
description: 'Release version (e.g., 1.0.0)'
26+
type: string
27+
required: true
28+
name:
29+
description: 'The name of the person to release the version'
30+
type: string
31+
required: false
32+
email:
33+
description: 'The email of the person to release the version'
34+
type: string
35+
required: false
36+
timezone:
37+
description: 'The timezone in the debian changelog file'
38+
required: false
39+
type: string
40+
default: 'Asia/Shanghai'
41+
42+
jobs:
43+
auto_release:
44+
uses: linuxdeepin/.github/.github/workflows/auto-release.yml@master
45+
secrets: inherit
46+
with:
47+
version: ${{ inputs.version }}
48+
name: ${{ inputs.name }}
49+
email: ${{ inputs.email }}
50+
timezone: ${{ inputs.timezone }}

.reuse/dep5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Copyright: None
4949
License: CC0-1.0
5050

5151
# Project file
52-
Files: *.pro *.prf *.pri *.qrc *CMakeLists.txt *.cmake *.in
52+
Files: *.pro *.prf *.pri *.qrc *CMakeLists.txt *.cmake *.in VERSION
5353
Copyright: None
5454
License: CC0-1.0
5555

.syncexclude

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
# are always ignored
1010
linglong.yaml
1111
conanfile.py
12+
VERSION

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
cmake_minimum_required(VERSION 3.25)
22

3-
set(DTK_VERSION "5.6.11" CACHE STRING "define project version")
3+
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DTK_FILE_VERSION)
4+
string(STRIP "${DTK_FILE_VERSION}" DTK_FILE_VERSION)
5+
set(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "define project version")
46
project(DtkGui
57
VERSION ${DTK_VERSION}
68
DESCRIPTION "DTK Gui module"

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.0.36

VERSION.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@version@

0 commit comments

Comments
 (0)