chore: add pkg-config support #1
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: Release Create | |
| on: | |
| pull_request: | |
| types: [closed] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| check-release-conditions: | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event.pull_request.merged == true && | |
| github.event.pull_request.base.ref == 'main' && | |
| startsWith(github.event.pull_request.head.ref, 'release/v') && | |
| startsWith(github.event.pull_request.user.login, 'github-actions') | |
| steps: | |
| - name: Check release conditions | |
| run: | | |
| echo "All conditions have been met!" | |
| create-release: | |
| permissions: | |
| contents: write | |
| needs: check-release-conditions | |
| runs-on: ubuntu-latest | |
| env: | |
| NEXT_RELEASE_TAG: ${{ github.event.pull_request.head.ref }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Prepare Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: pip install -r ./tools/release/requirements.txt | |
| - name: Extract Tag from branch name | |
| run: | | |
| NEXT_RELEASE_TAG=$(echo $NEXT_RELEASE_TAG | sed 's/^release\///') | |
| echo "NEXT_RELEASE_TAG=${NEXT_RELEASE_TAG}" >> $GITHUB_ENV | |
| - name: Target release Tag | |
| run: echo "New tag $NEXT_RELEASE_TAG" | |
| - name: Setup Ninja | |
| run: sudo apt-get install ninja-build | |
| - name: Build singleheader | |
| run: | | |
| cmake -DMERVE_TESTING=OFF -G Ninja -B build | |
| cmake --build build --target merve-singleheader-lib | |
| - name: Create singleheader.zip | |
| run: | | |
| cd build/singleheader | |
| zip singleheader.zip merve.h merve.cpp | |
| mv singleheader.zip ../../singleheader/ | |
| cp merve.h merve.cpp ../../singleheader/ | |
| - name: Create release | |
| run: ./tools/release/create_release.py |