File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ name: armhf build
22
33on :
44 push :
5- branches :
6- - main
5+ # Sequence of patterns matched against refs/tags
6+ tags :
7+ - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
78
89env :
910 BUILD_TYPE : Release
@@ -26,13 +27,15 @@ jobs:
2627 cd build
2728 cmake .. -DCMAKE_CXX_COMPILER=$(which arm-linux-gnueabihf-g++-8) \
2829 -DCMAKE_C_COMPILER=$(which arm-linux-gnueabihf-gcc-8) \
29- -DARMHF_DEB=ON
30+ -DARMHF_DEB=ON \
31+ -DARCHITECTURE="armhf" \
32+ -DGIT_VERSION=${{ github.ref }}
3033 make -j$(nproc)
3134 make package
3235 armhf__filename__=$(echo $(ls ${{steps.armhf-artifact-download.outputs.download-path}} | grep ..armhf.deb) | tr -d '\n')
3336 version__name__=${armhf__filename__#*-}
3437 name__=$(echo ${armhf__filename__%-*} | tr -d '\n')
35- version__=$(cat ../VERSION)
38+ version__=${{ github.ref }}
3639 echo "name__=$name__" >> $GITHUB_ENV
3740 echo "version__=$version__" >> $GITHUB_ENV
3841 echo "armhf__filename__=$armhf__filename__" >> $GITHUB_ENV
4245 env :
4346 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4447 with :
45- tag_name : ${{ env.version__ }}
46- release_name : ${{ env.name__ }}
48+ tag_name : ${{ github.ref }}
49+ release_name : Release ${{ github.ref }}
4750 draft : false
4851 prerelease : false
4952 - name : Upload Release Asset
Original file line number Diff line number Diff line change @@ -90,16 +90,16 @@ configure_file(
9090
9191install (TARGETS ${PROJECT_NAME} DESTINATION /usr/sbin)
9292
93- if (VERSION_FILE)
94- execute_process (
95- COMMAND bash -c "echo -n ${CMAKE_PROJECT_VERSION} -${git_version} > VERSION"
96- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
97- )
93+ if (GIT_VERSION)
94+ set (git_version ${GIT_VERSION} )
9895endif ()
9996
10097if (ARMHF_DEB)
10198
102- set (ARCHITECTURE "armhf" )
99+ if (ARCHITECTURE)
100+ else ()
101+ EXECUTE_PROCESS ( COMMAND uname -m COMMAND tr -d ' \n' OUTPUT_VARIABLE ARCHITECTURE )
102+ endif ()
103103 set (CPACK_GENERATOR "DEB" )
104104 set (CPACK_SOURCE_GENERATOR "TGZ" )
105105 set (CPACK_DEBIAN_PACKAGE_MAINTAINER "Shreyas Atre" )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments