diff --git a/.editorconfig b/.editorconfig index fb0fd86..97376cf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,4 +7,10 @@ root = true indent_style = space indent_size = 4 charset = utf-8 -end_of_line = crlf \ No newline at end of file +end_of_line = crlf + +[*.yml] +indent_size = 2 + +[*.json] +indent_size = 2 \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..940c0a7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,46 @@ +name: Build and publish + +# run on pushes to master OR on version tag creation +on: + push: + branches: + - master + tags: + - v* + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install CMake + uses: lukka/get-cmake@latest + + - name: Build + uses: lukka/run-cmake@v10 + with: + configurePreset: x64-windows + buildPreset: Release + + - name: Publish release (version tag) + if: startsWith(github.ref, 'refs/tags/v') + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + prerelease: false + files: | + build/bin/Release/*.exe + + - name: Publish pre-release (push to master) + if: github.ref == 'refs/heads/master' + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + automatic_release_tag: latest + title: Development build + prerelease: true + draft: true + files: | + build/bin/Release/*.exe \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..0da06fa --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,26 @@ +{ + "version": 6, + "cmakeMinimumRequired": { + "major": 3, + "minor": 15, + "patch": 0 + }, + "configurePresets": [ + { + "name": "x64-windows", + "binaryDir": "${sourceDir}/build", + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "x64", + "strategy": "set" + } + } + ], + "buildPresets": [ + { + "name": "Release", + "configurePreset": "x64-windows", + "configuration": "Release" + } + ] +} \ No newline at end of file