Skip to content

Update release workflow #1

Update release workflow

Update release workflow #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
cmake_args: -DCMAKE_BUILD_TYPE=Release
- os: macos-latest
cmake_args: -DCMAKE_BUILD_TYPE=Release
- os: windows-latest
cmake_args: -DCMAKE_BUILD_TYPE=Release
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up CMake
uses: lukka/get-cmake@latest
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libboost-all-dev catch2
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install boost catch2
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg.exe install boost catch2
- name: Build and package
run: |
mkdir build
cd build
cmake ${{ matrix.cmake_args }} .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build . --config Release
cpack
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/*.zip
asset_name: 'your-app-${{ matrix.os }}.zip'
asset_content_type: application/zip