Skip to content

Commit

Permalink
Update release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
anchpop committed Oct 15, 2024
1 parent 9d50250 commit ed0e3f1
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build SpaceBoom
name: Build Spec-Hops

on:
pull_request:
Expand All @@ -14,15 +14,15 @@ jobs:
matrix:
include:
- os: ubuntu-latest
output_name: SpaceBoom-linux
output_name: Spec-Hops-linux
- os: macos-latest
output_name: SpaceBoom-macos-intel
output_name: Spec-Hops-macos-intel
arch: x86_64
- os: macos-latest
output_name: SpaceBoom-macos-arm
output_name: Spec-Hops-macos-arm
arch: arm64
- os: windows-latest
output_name: SpaceBoom-windows.exe
output_name: Spec-Hops-windows.exe

steps:
- name: Checkout repository and submodules
Expand Down Expand Up @@ -74,9 +74,26 @@ jobs:
if: github.event_name == 'release'
run: |
mkdir release
cp build/OpenGL/${{ matrix.os == 'windows-latest' && 'Release/' || '' }}SpaceBoom${{ matrix.os == 'windows-latest' && '.exe' || '' }} release/${{ matrix.output_name }}
EXECUTABLE_PATH="build/OpenGL/"
EXECUTABLE_NAME="Spec-Hops"
if [ "${{ matrix.os }}" == 'windows-latest' ]; then
EXECUTABLE_PATH="${EXECUTABLE_PATH}Release/"
EXECUTABLE_NAME="${EXECUTABLE_NAME}.exe"
fi
cp "${EXECUTABLE_PATH}${EXECUTABLE_NAME}" "release/${{ matrix.output_name }}"
cp -r OpenGL/res release/res
# Copy dynamic libraries
if [ "${{ matrix.os }}" == 'windows-latest' ]; then
# Copy all .dll files from the build directory to release
find "${EXECUTABLE_PATH}" -name "*.dll" -exec cp {} release/ \;
else
# Copy all .so and .dylib files from the build directory to release
find "${EXECUTABLE_PATH}" -type f \( -name "*.so" -o -name "*.dylib" \) -exec cp {} release/ \;
fi
- name: Set executable permissions (macOS)
if: github.event_name == 'release' && matrix.os != 'windows-latest'
run: |
Expand Down

0 comments on commit ed0e3f1

Please sign in to comment.