File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 66# Created On : <2025-06-10>
77# Last Modified : <2025-06-16>
88#
9- # This workflow build and publish DEB packages
9+ # Build and publish DEB packages
1010# ---------------------------------------------------------------
1111
1212name : Build and Publish DEB package
@@ -30,18 +30,25 @@ jobs:
3030 steps :
3131 - name : Checkout repo
3232 uses : actions/checkout@v4
33+ with :
34+ ref : gh-build
3335
34- - name : Get version from tag or input
36+ - name : 获取版本号 from tag or input
3537 id : get_version
3638 run : |
3739 if [ "${{ github.event_name }}" = "release" ]; then
3840 version="${{ github.event.release.tag_name }}"
39- version=${version#v} # Remove 'v' prefix if present
41+ # 删除前缀 'v' if present
42+ version=${version#v}
43+
4044 elif [ "${{ github.event_name }}" = "push" ];then
41- version="9.9.9" # Default version for push events (temporarily)
45+ # 从源代码中提取版本号
46+ version=$(sed -E -n 's/^#define Chsrc_Version +"([0-9]+\.[0-9]+\.[0-9]+).*"/\1/p' ./src/chsrc-main.c)
47+
4248 else
4349 version="${{ github.event.inputs.version }}"
4450 fi
51+
4552 echo "version=$version" >> $GITHUB_OUTPUT
4653 echo "Version: $version"
4754
You can’t perform that action at this time.
0 commit comments