1+ name : CI Cortex CPP Beta Build
2+
3+ on :
4+ push :
5+ tags : ["v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"]
6+
7+ jobs :
8+ # Job create Update app version based on latest release tag with build number and save to output
9+ get-update-version :
10+ uses : ./.github/workflows/template-get-update-version.yml
11+
12+ create-draft-release :
13+ runs-on : ubuntu-latest
14+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
15+ outputs :
16+ upload_url : ${{ steps.create_release.outputs.upload_url }}
17+ version : ${{ steps.get_version.outputs.version }}
18+ permissions :
19+ contents : write
20+ steps :
21+ - name : Extract tag name without v prefix
22+ id : get_version
23+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
24+ env :
25+ GITHUB_REF : ${{ github.ref }}
26+ - name : Create Draft Release
27+ id : create_release
28+ uses : softprops/action-gh-release@v2
29+ with :
30+ tag_name : ${{ github.ref_name }}
31+ token : ${{ secrets.GITHUB_TOKEN }}
32+ name : " ${{ env.VERSION }}"
33+ draft : true
34+ prerelease : false
35+
36+ build-macos-x64 :
37+ uses : ./.github/workflows/template-build-macos.yml
38+ needs : [get-update-version]
39+ secrets : inherit
40+ with :
41+ ref : ${{ github.ref }}
42+ public_provider : github
43+ new_version : ${{ needs.get-update-version.outputs.new_version }}
44+ runs-on : macos-12
45+ cmake-flags : " -DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
46+ channel : beta
47+ arch : amd64
48+
49+ build-macos-arm64 :
50+ uses : ./.github/workflows/template-build-macos.yml
51+ needs : [get-update-version]
52+ secrets : inherit
53+ with :
54+ ref : ${{ github.ref }}
55+ public_provider : github
56+ new_version : ${{ needs.get-update-version.outputs.new_version }}
57+ runs-on : macos-latest
58+ cmake-flags : " -DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DMAC_ARM64=ON -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
59+ channel : beta
60+ arch : arm64
61+
62+ build-windows-x64 :
63+ uses : ./.github/workflows/template-build-windows-x64.yml
64+ secrets : inherit
65+ needs : [get-update-version]
66+ with :
67+ ref : ${{ github.ref }}
68+ public_provider : github
69+ new_version : ${{ needs.get-update-version.outputs.new_version }}
70+ runs-on : windows-cuda-11-7
71+ cmake-flags : " -DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=C:/w/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
72+ build-deps-cmake-flags : " -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
73+ ccache-dir : ' C:\Users\ContainerAdministrator\AppData\Local\ccache'
74+ channel : beta
75+
76+ build-linux-x64 :
77+ uses : ./.github/workflows/template-build-linux-x64.yml
78+ secrets : inherit
79+ needs : [get-update-version]
80+ with :
81+ ref : ${{ github.ref }}
82+ public_provider : github
83+ new_version : ${{ needs.get-update-version.outputs.new_version }}
84+ runs-on : ubuntu-20-04
85+ cmake-flags : " -DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
86+ channel : beta
87+
88+ update_release_draft :
89+ needs : [build-macos-x64, build-macos-arm64, build-windows-x64, build-linux-x64]
90+ permissions :
91+ # write permission is required to create a github release
92+ contents : write
93+ # write permission is required for autolabeler
94+ # otherwise, read permission is required at least
95+ pull-requests : write
96+ runs-on : ubuntu-latest
97+ steps :
98+ # (Optional) GitHub Enterprise requires GHE_HOST variable set
99+ # - name: Set GHE_HOST
100+ # run: |
101+ # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
102+
103+ # Drafts your next Release notes as Pull Requests are merged into "master"
104+ - uses : release-drafter/release-drafter@v5
105+ # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
106+ # with:
107+ # config-name: my-config.yml
108+ # disable-autolabeler: true
109+ env :
110+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments