diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..812d831 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + # Run tests before creating release + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + + - name: Configure CMake + run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release + + - name: Build + run: cmake --build build --config Release + + - name: Run tests + run: ./build/all_tests + + # Create GitHub release after tests pass + release: + needs: test + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c62fcf..5d938dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,8 @@ project(DNLP_Diff_Engine C) set(CMAKE_C_STANDARD 99) set(DIFF_ENGINE_VERSION_MAJOR 0) -set(DIFF_ENGINE_VERSION_MINOR 0) -set(DIFF_ENGINE_VERSION_PATCH 1) +set(DIFF_ENGINE_VERSION_MINOR 1) +set(DIFF_ENGINE_VERSION_PATCH 0) set(DIFF_ENGINE_VERSION "${DIFF_ENGINE_VERSION_MAJOR}.${DIFF_ENGINE_VERSION_MINOR}.${DIFF_ENGINE_VERSION_PATCH}") add_compile_definitions(DIFF_ENGINE_VERSION="${DIFF_ENGINE_VERSION}")