Skip to content

v0.1.6

v0.1.6 #23

name: Release generator
# on: [push]
on:
push:
tags:
- "v*.*.*"
env:
CMAKE_BUILD_TYPE: Debug
jobs:
create-linux-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get required tools
run: sudo apt install gcc-9 g++-9 zip
- name: Create build environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DDEPLOYMENT_BUILD:BOOL=YES
env:
CC: gcc-9
CXX: g++-9
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $CMAKE_BUILD_TYPE --target signet
- name: Zip executable
working-directory: ${{github.workspace}}/build
run: zip signet_linux signet
- uses: actions/upload-artifact@v4
with:
name: signet_linux.zip
path: build/signet_linux.zip
- uses: actions/upload-artifact@v4
with:
name: RELEASE.md
path: ./RELEASE.md
create-macos-binary:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake Using Default Compiler
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DDEPLOYMENT_BUILD:BOOL=YES
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $CMAKE_BUILD_TYPE --target signet
- name: Zip executable
working-directory: ${{github.workspace}}/build
shell: bash
run: zip signet_macos signet
- uses: actions/upload-artifact@v4
with:
name: signet_macos.zip
path: build/signet_macos.zip
create-windows-binary:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake using default compiler
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DDEPLOYMENT_BUILD:BOOL=YES
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $CMAKE_BUILD_TYPE --target signet
- name: Copy executable to build directory
# When building visual studio projects, it puts the binaries in subdirectories
shell: bash
working-directory: ${{github.workspace}}/build
run: mv $CMAKE_BUILD_TYPE/signet.exe ./signet.exe
- name: Zip executable
working-directory: ${{github.workspace}}/build
run: 7z a signet_windows.zip signet.exe
- uses: actions/upload-artifact@v4
with:
name: signet_windows.zip
path: build/signet_windows.zip
generate-release:
runs-on: ubuntu-latest
needs: [create-linux-binary, create-windows-binary, create-macos-binary]
steps:
- name: Get Artifacts
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -la
- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: true
body_path: RELEASE.md/RELEASE.md
files: |
RELEASE.md/*
signet_linux.zip/*
signet_windows.zip/*
signet_macos.zip/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}