3737 env :
3838 # Indicates the CMake build directory where project files and binaries are being produced.
3939 CMAKE_BUILD_DIR : ${{ github.workspace }}/build
40- archive-name : " "
4140
4241 steps :
4342 - name : Install APT packages
@@ -77,41 +76,22 @@ jobs:
7776 -G Ninja \
7877 -D VCPKG_TARGET_TRIPLET="${{ matrix.triplet }}" \
7978 -D CMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \
80- -D BUILD_UMBRA_DEMO=ON
79+ -D UMBRA_DEMO=ON
80+ -D UMBRA_CPACK=ON
8181 # Build the whole project with Ninja (which is spawn by CMake).
8282 - name : Build
8383 run : cmake --build "${CMAKE_BUILD_DIR}"
8484 - name : Show contents of the build directory
8585 run : find "${CMAKE_BUILD_DIR}"
86- # Sets env.archive-name, which is used to name the distribution folder and archive.
87- - name : Set archive name
88- run : |
89- ARCHIVE_NAME=${{ env.project-name }}-`git describe --always`-${{ matrix.platform-name }}
90- echo "Archive name set to: $ARCHIVE_NAME"
91- echo "archive-name=$ARCHIVE_NAME" >> $GITHUB_ENV
9286 # Copy files from the CMake build and data directory into a new distribution folder.
93- - name : Package distribution
94- run : |
95- mkdir -p dist/${{ env.archive-name }}
96- cp "${CMAKE_BUILD_DIR}/bin"/* dist/${{ env.archive-name }}
97- cp -R data dist/${{ env.archive-name }}
98- - name : Show contents of the dist directory
99- run : find dist/${{ env.archive-name }}
100- # Zip the distribution folder, using the platform appropriate tools.
101- - name : Tar files
102- if : runner.os != 'Windows'
103- working-directory : ./dist
104- run : tar --format=ustar -czvf "../${{ env.archive-name }}.tar.gz" */
105- - name : Archive files
106- if : runner.os == 'Windows'
107- shell : pwsh
108- run : Compress-Archive dist/*/ ${{ env.archive-name }}.zip
87+ - name : CPack
88+ run : cpack --verbose --config ${{env.CMAKE_BUILD_DIR}}/CPackConfig.cmake -B dist -R `git describe --always`
10989 # Upload archives as artifacts, these can be downloaded from the GitHub Actions page.
11090 - name : " Upload Artifact"
11191 uses : actions/upload-artifact@v6
11292 with :
11393 name : automated-builds-${{ matrix.triplet }}
114- path : ${{ env.archive-name }} .*
94+ path : dist/* .*
11595 retention-days : 7
11696 compression-level : 0
11797 if-no-files-found : error
@@ -121,7 +101,7 @@ jobs:
121101 uses : svenstaro/upload-release-action@v2
122102 with :
123103 repo_token : ${{ secrets.GITHUB_TOKEN }}
124- file : ${{ env.archive-name }} .*
104+ file : dist/* .*
125105 file_glob : true
126106 tag : ${{ github.ref }}
127107 overwrite : true
0 commit comments