Skip to content

feat(ci) Adds manual workflow for publishing releases #3

feat(ci) Adds manual workflow for publishing releases

feat(ci) Adds manual workflow for publishing releases #3

name: CMake
on:
workflow_dispatch: {}
push:
branches:
- feature/publish-release-from-ci
env:
BUILD_TYPE: Release
jobs:
build-and-test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Configure CMake
env:
BUILD_DIR: build-${{ matrix.os }}
run: cmake -B ${{github.workspace}}/${BUILD_DIR} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSEMVERUTIL_ENABLE_TESTS=ON -DSEMVERUTIL_STATIC_BINARY=ON
- name: Build
env:
BUILD_DIR: build-${{ matrix.os }}
run: cmake --build ${{github.workspace}}/${BUILD_DIR} --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/${{ matrix.os }}
run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure
- name: Upload
uses: actions/upload-artifact@v4
with:
name: dist=${{ matrix.os }}
path: |
${{ matrix.os }}/src/semverutil