Fix CI: Python and TypeScript binding tests #3
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: Tagged Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Build, Test & Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Verify tag matches CMakeLists version | |
| run: | | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| CMAKE_VERSION=$(grep -oP 'project\s*\([^)]*VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) | |
| if [ "$TAG_VERSION" != "$CMAKE_VERSION" ]; then | |
| echo "ERROR: Tag version ($TAG_VERSION) does not match CMakeLists.txt version ($CMAKE_VERSION)" | |
| exit 1 | |
| fi | |
| echo "Version verified: $TAG_VERSION" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc g++ | |
| - name: Configure | |
| run: cmake -B build -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON | |
| - name: Build | |
| run: cmake --build build | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true |