7
0
mirror of https://gitlab.com/raylibtemplates/rt.git synced 2026-06-05 02:00:54 -04:00

Update cmake-multi-platform.yml

This commit is contained in:
2025-11-06 23:42:19 +00:00
committed by GitHub
parent dada2f73be
commit 853211e575

View File

@@ -6,6 +6,9 @@ on:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
@@ -118,25 +121,29 @@ jobs:
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}
- name: Create Release ZIP
- name: Create Release ZIP (Windows)
if: matrix.platform == 'Windows'
run: |
cd ${{ steps.strings.outputs.build-output-dir }}
if [ "${{ matrix.platform }}" = "Web" ]; then
zip -r ../${{ matrix.artifact_name }}.zip *.html *.js *.data
elif [ "${{ matrix.platform }}" = "Windows" ]; then
cd ${{ matrix.build_type }}
zip -r ../../${{ matrix.artifact_name }}.zip *.exe
else
zip -r ../${{ matrix.artifact_name }}.zip * -x "*.cmake" "*.txt" "*.json" "*.a" "*.o" "*.d" "*.make" "*.internal" "*.marks" "Makefile" ".ninja*" "*.ninja" "CMakeFiles/*"
fi
cd build/${{ matrix.build_type }}
Compress-Archive -Path *.exe -DestinationPath ../../${{ matrix.artifact_name }}.zip
shell: pwsh
- name: Create Release ZIP (Web)
if: matrix.platform == 'Web'
run: |
cd build
zip -r ../${{ matrix.artifact_name }}.zip *.html *.js *.data
shell: bash
- name: Create Release
uses: softprops/action-gh-release@v1
- name: Create Release ZIP (Linux/macOS)
if: matrix.platform == 'Linux' || matrix.platform == 'MacOS'
run: |
cd build
zip -r ../${{ matrix.artifact_name }}.zip * -x "*.cmake" "*.txt" "*.json" "*.a" "*.o" "*.d" "*.make" "*.internal" "*.marks" "Makefile" ".ninja*" "*.ninja" "CMakeFiles/*"
shell: bash
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
files: ${{ matrix.artifact_name }}.zip
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}.zip