push version -> 1.0.3 #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake Release Build Windows Server 2022 | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Revert to CMake 3.27 | |
run: | | |
choco uninstall cmake.install -x | |
choco install cmake.install --version=3.27.9 | |
- name: Git Commit Data | |
uses: rlespinasse/[email protected] | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/release_pkg_full -DFIGLET_INSTALL_LIBWINPTHREAD=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} | |
- name: Build installer | |
working-directory: ${{github.workspace}}/build | |
run: cpack . -G WIX | |
- name: Get version | |
id: get-version | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: ${{github.workspace}}/VERSION | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: FIGlet4Win_Main_Release-${{env.GIT_COMMIT_SHORT_SHA}} | |
path: ${{github.workspace}}/build/figlet4win-${{steps.get-version.outputs.content}}-win64.msi | |
- name: Pack full portable package | |
shell: pwsh | |
run: | | |
cmake --install ${{github.workspace}}/build | |
Compress-Archive -Path ${{github.workspace}}/build/release_pkg_full/* -DestinationPath ${{github.workspace}}/build/figlet4win-portable-full-${{steps.get-version.outputs.content}}-win64.zip | |
- name: Upload full portable package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: FIGlet4Win_Main_Release_Portable_Full-${{env.GIT_COMMIT_SHORT_SHA}} | |
path: ${{github.workspace}}/build/figlet4win-portable-full-${{steps.get-version.outputs.content}}-win64.zip | |
- name: Cleanup full build result | |
run: cmake --build ${{github.workspace}}/build --target clean | |
- name: Configure CMake (lite) | |
run: cmake -B ${{github.workspace}}/build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/release_pkg_lite -DFIGLET_BUILD_FIGINSTALL=OFF -DFIGLET_INSTALL_LIBWINPTHREAD=ON | |
- name: Build (lite) | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test (lite) | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} | |
- name: Pack lite portable package | |
shell: pwsh | |
run: | | |
cmake --install ${{github.workspace}}/build | |
Compress-Archive -Path ${{github.workspace}}/build/release_pkg_lite/* -DestinationPath ${{github.workspace}}/build/figlet4win-portable-lite-${{steps.get-version.outputs.content}}-win64.zip | |
- name: Upload lite portable package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: FIGlet4Win_Main_Release_Portable_Lite-${{env.GIT_COMMIT_SHORT_SHA}} | |
path: ${{github.workspace}}/build/figlet4win-portable-lite-${{steps.get-version.outputs.content}}-win64.zip | |