Skip to content

Merge pull request #330 from ConcealNetwork/development #45

Merge pull request #330 from ConcealNetwork/development

Merge pull request #330 from ConcealNetwork/development #45

Workflow file for this run

name: Windows
on:
push:
tags:
- "*"
jobs:
build-windows:
name: Windows
runs-on: windows-2022
env:
BOOST_ROOT: C:/local/boost_1_83_0
steps:
- uses: actions/checkout@master
- name: Setup msbuild
uses: microsoft/[email protected]
- name: Restore Boost
uses: actions/cache@v3
id: restore-boost
with:
path: ${{env.BOOST_ROOT}}
key: boost_1_83_0-msvc-14.3-64
- name: Install Boost
if: steps.restore-boost.outputs.cache-hit != 'true'
shell: powershell
run: |
$Url = "https://sourceforge.net/projects/boost/files/boost-binaries/1.83.0/boost_1_83_0-msvc-14.3-64.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${env:BOOST_ROOT}"
- name: Build
shell: powershell
id: build
run: |
$build_folder = "build"
$ccx_version = "${{ github.ref }}" -replace 'refs/tags/'
$release_name = "ccx-cli-win64-v$ccx_version"
mkdir "$build_folder"
cd "$build_folder"
cmake -G "Visual Studio 17 2022" ..
msbuild concealX.sln /p:Configuration=Release /m
cd src\Release
Compress-Archive -Path *.exe -DestinationPath "$release_name.zip"
$sha256 = (Get-FileHash "$release_name.zip").Hash
$asset_path = "./$build_folder/src/Release/$release_name.zip"
mkdir "$release_name"
cp *.exe "$release_name/"
echo "sha256=${sha256}" >> $env:GITHUB_OUTPUT
echo "release_name=${release_name}.zip" >> $env:GITHUB_OUTPUT
echo "asset_path=${asset_path}" >> $env:GITHUB_OUTPUT
echo "ccx_version=${ccx_version}" >> $env:GITHUB_OUTPUT
- name: Create Release
uses: softprops/[email protected]
with:
files: ${{ steps.build.outputs.asset_path }}
name: Conceal Core CLI v${{ steps.build.outputs.ccx_version }}
body: |
[Download for Windows](../../releases/download/${{ steps.build.outputs.ccx_version }}/${{ steps.build.outputs.release_name }}) **${{ steps.build.outputs.release_name }}**
`SHA256 : ${{ steps.build.outputs.sha256 }}`
append_body: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}