Version 0.1.0 #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Release ⸺ stronger-cpp | |
| on: | |
| push: | |
| tags: | |
| - '*.*.*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.get_version.outputs.version }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - id: get_version | |
| run: | | |
| VERSION=$(cat VERSION) | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Install Python + Conan | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install conan~=2.0 | |
| - name: Conan install | |
| run: | | |
| conan profile detect --force | |
| conan install . --output-folder=build-release -s build_type=Release --build=missing | |
| - name: Configure (CMake preset) | |
| run: cmake --preset conan-release | |
| - name: Build header-only target | |
| run: cmake --build build-release --target make_header_only | |
| - name: Upload generated stronger.hpp | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: stronger.hpp | |
| path: public/stronger.hpp | |
| if-no-files-found: error | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download stronger.hpp artefact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: stronger.hpp | |
| path: dist | |
| - name: Publish release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.build.outputs.version }} | |
| name: "${{ needs.build.outputs.version }}" | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false | |
| files: dist/stronger.hpp |