Skip to content

Commit

Permalink
Separate release builds and only upload .so file
Browse files Browse the repository at this point in the history
  • Loading branch information
bkacjios committed Jan 3, 2025
1 parent c77baea commit 44cd0bb
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,26 @@ jobs:
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}

- name: Create Release
id: create_release
- name: Create Release for GCC
if: matrix.c_compiler == 'gcc'
id: create_gcc_release
run: |
RELEASE_TAG="v$(date +'%Y%m%d%H%M%S')" # Create a version tag based on the current timestamp
echo "Creating release with tag $RELEASE_TAG"
zip -r $RELEASE_TAG.zip ${{ steps.strings.outputs.build-output-dir }} # Zip the build directory
gh release create $RELEASE_TAG $RELEASE_TAG.zip # Upload the zip file
RELEASE_TAG="v${{ matrix.build_type }}-gcc" # Tag with build type and compiler
echo "Creating GCC release with tag $RELEASE_TAG"
GCC_SO_FILE=$(find ${{ steps.strings.outputs.build-output-dir }} -name '*.so' -type f)
echo "Found SO file: $GCC_SO_FILE"
gh release create $RELEASE_TAG $GCC_SO_FILE # Upload the .so file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release for Clang
if: matrix.c_compiler == 'clang'
id: create_clang_release
run: |
RELEASE_TAG="v${{ matrix.build_type }}-clang" # Tag with build type and compiler
echo "Creating Clang release with tag $RELEASE_TAG"
CLANG_SO_FILE=$(find ${{ steps.strings.outputs.build-output-dir }} -name '*.so' -type f)
echo "Found SO file: $CLANG_SO_FILE"
gh release create $RELEASE_TAG $CLANG_SO_FILE # Upload the .so file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 44cd0bb

Please sign in to comment.