File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - " *"
7+ workflow_dispatch :
8+ inputs :
9+ branch :
10+ description : ' Checkout branch'
11+ required : false
12+ tag :
13+ description : ' Checkout tag'
14+ required : false
715
816jobs :
917 build-omodsim :
10- name : Build OpenModSim deb package version '${{ github.ref_name }}' with Qt5
18+ name : Build OpenModSim deb package version '${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}' with Qt5
1119 runs-on : ubuntu-latest
1220 container :
1321 image : ubuntu:20.04
@@ -29,14 +37,16 @@ jobs:
2937 - name : Checkout repository
3038 uses : actions/checkout@v4
3139 with :
32- ref : ${{ github.ref_name }}
40+ ref : ${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}
3341
3442 - name : Extract version from CMakeLists.txt
3543 id : extract_version
3644 run : |
3745 FULL_VERSION=$(grep -oP 'VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' omodsim/CMakeLists.txt)
3846
39- if [ "${GITHUB_REF_NAME}" = "dev" ]; then
47+ if [ ! -z "${{ github.event.inputs.tag }}" ]; then
48+ APP_VERSION="${{ github.event.inputs.tag }}"
49+ elif [ "${GITHUB_REF_NAME}" = "dev" ]; then
4050 MAJOR_MINOR=$(echo "$FULL_VERSION" | cut -d. -f1,2)
4151 APP_VERSION="${MAJOR_MINOR}~dev"
4252 else
Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - " *"
7+ workflow_dispatch :
8+ inputs :
9+ branch :
10+ description : ' Checkout branch'
11+ required : false
12+ tag :
13+ description : ' Checkout tag'
14+ required : false
715
816jobs :
917 build-omodsim :
10- name : Build OpenModSim deb package version '${{ github.ref_name }}' with Qt6
18+ name : Build OpenModSim deb package version '${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}' with Qt6
1119 runs-on : ubuntu-latest
1220 container :
1321 image : ubuntu:20.04
@@ -29,14 +37,16 @@ jobs:
2937 - name : Checkout repository
3038 uses : actions/checkout@v4
3139 with :
32- ref : ${{ github.ref_name }}
40+ ref : ${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}
3341
3442 - name : Extract version from CMakeLists.txt
3543 id : extract_version
3644 run : |
3745 FULL_VERSION=$(grep -oP 'VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' omodsim/CMakeLists.txt)
3846
39- if [ "${GITHUB_REF_NAME}" = "dev" ]; then
47+ if [ ! -z "${{ github.event.inputs.tag }}" ]; then
48+ APP_VERSION="${{ github.event.inputs.tag }}"
49+ elif [ "${GITHUB_REF_NAME}" = "dev" ]; then
4050 MAJOR_MINOR=$(echo "$FULL_VERSION" | cut -d. -f1,2)
4151 APP_VERSION="${MAJOR_MINOR}~dev"
4252 else
Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - " *"
7+ workflow_dispatch :
8+ inputs :
9+ branch :
10+ description : ' Checkout branch'
11+ required : false
12+ tag :
13+ description : ' Checkout tag'
14+ required : false
715
816env :
917 QT_VERSION : 5.15.2
1624
1725jobs :
1826 build-omodsim :
19- name : Build OpenModSim installer version '${{ github.ref_name }}' with Qt5 on Windows x86
27+ name : Build OpenModSim installer version '${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}' with Qt5 on Windows x86
2028 runs-on : windows-latest
2129
2230 steps :
2331 - name : Checkout repository
2432 uses : actions/checkout@v4
2533 with :
26- ref : ${{ github.ref_name }}
34+ ref : ${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}
2735
2836 - name : Extract version from CMakeLists.txt
2937 run : |
3038 for /f "tokens=2" %%i in ('findstr /R /C:"VERSION [0-9]*\.[0-9]*\.[0-9]*" omodsim\CMakeLists.txt') do echo APP_VERSION=%%i>>%GITHUB_ENV%
3139 shell : cmd
3240
3341 - name : Convert version for dev branch
34- if : ${{ github.ref_name == 'dev' }}
42+ if : ${{ github.ref_name == 'dev' || github.event.inputs.branch == 'dev' }}
3543 run : |
3644 for /f "tokens=1,2 delims=." %%a in ("%APP_VERSION%") do (
3745 echo APP_VERSION=%%a.%%b-dev>>%GITHUB_ENV%
Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - " *"
7+ workflow_dispatch :
8+ inputs :
9+ branch :
10+ description : ' Checkout branch'
11+ required : false
12+ tag :
13+ description : ' Checkout tag'
14+ required : false
715
816env :
917 QT_VERSION : 5.15.2
1523
1624jobs :
1725 build-omodsim :
18- name : Build OpenModSim installer version '${{ github.ref_name }}' with Qt5 on Windows x64
26+ name : Build OpenModSim installer version '${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}' with Qt5 on Windows x64
1927 runs-on : windows-latest
2028
2129 steps :
2230 - name : Checkout repository
2331 uses : actions/checkout@v4
2432 with :
25- ref : ${{ github.ref_name }}
33+ ref : ${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}
2634
2735 - name : Extract version from CMakeLists.txt
2836 run : |
2937 for /f "tokens=2" %%i in ('findstr /R /C:"VERSION [0-9]*\.[0-9]*\.[0-9]*" omodsim\CMakeLists.txt') do echo APP_VERSION=%%i>>%GITHUB_ENV%
3038 shell : cmd
3139
3240 - name : Convert version for dev branch
33- if : ${{ github.ref_name == 'dev' }}
41+ if : ${{ github.ref_name == 'dev' || github.event.inputs.branch == 'dev' }}
3442 run : |
3543 for /f "tokens=1,2 delims=." %%a in ("%APP_VERSION%") do (
3644 echo APP_VERSION=%%a.%%b-dev>>%GITHUB_ENV%
Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - " *"
7+ workflow_dispatch :
8+ inputs :
9+ branch :
10+ description : ' Checkout branch'
11+ required : false
12+ tag :
13+ description : ' Checkout tag'
14+ required : false
715
816env :
917 QT_VERSION : 6.9.3
1523
1624jobs :
1725 build-omodsim :
18- name : Build OpenModSim installer version '${{ github.ref_name }}' with Qt6
26+ name : Build OpenModSim installer version '${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}' with Qt6
1927 runs-on : windows-latest
2028
2129 steps :
2230 - name : Checkout repository
2331 uses : actions/checkout@v4
2432 with :
25- ref : ${{ github.ref_name }}
33+ ref : ${{ github.event.inputs.tag || github.event.inputs.branch || github. ref_name }}
2634
2735 - name : Extract version from CMakeLists.txt
2836 run : |
2937 for /f "tokens=2" %%i in ('findstr /R /C:"VERSION [0-9]*\.[0-9]*\.[0-9]*" omodsim\CMakeLists.txt') do echo APP_VERSION=%%i>>%GITHUB_ENV%
3038 shell : cmd
3139
3240 - name : Convert version for dev branch
33- if : ${{ github.ref_name == 'dev' }}
41+ if : ${{ github.ref_name == 'dev' || github.event.inputs.branch == 'dev' }}
3442 run : |
3543 for /f "tokens=1,2 delims=." %%a in ("%APP_VERSION%") do (
3644 echo APP_VERSION=%%a.%%b-dev>>%GITHUB_ENV%
You can’t perform that action at this time.
0 commit comments