chore: minor fix ci #5
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 Reimu from C++ Source Code | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags: | |
| - 'v*.*.*' | |
| pull_request: | |
| branches: | |
| - '**' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build_cpp: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v4 | |
| - name: Set up xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| with: | |
| xmake-version: latest | |
| - name: Build binary from source (use clang) | |
| run: xmake f --toolchain=clang -y && xmake -y | |
| - name: Build binary from source (use gcc) | |
| run: xmake f --toolchain=gcc -y && xmake -y | |
| # TODO: maybe we need unit test here | |
| - name: Create GitHub Release and Upload Binary | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| with: | |
| files: build/linux/x86_64/release/reimu | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |