Skip to content

Commit

Permalink
Add bundle of server for macos and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed Nov 15, 2024
1 parent dccd113 commit 6ff9757
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 4 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,3 +397,88 @@ jobs:
with:
name: Colomb_server-linux.sh
path: ./server/Colomb_server-linux.sh

release-server-macos:
runs-on: macos-latest
needs: [release-create, date-to-tar, raylib-to-tar, raylibcpp-to-tar, enet-to-tar, zstd-to-tar]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
cd server
./scripts/install-deps-macos.sh
- name: Build
run: |
cd server
./scripts/bundle-macos.sh
- name: Upload To Release
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release-create.outputs.release }} ./server/Colomb_server-macos.zip
gh release upload ${{ needs.release-create.outputs.release }} ./server/Colomb_server-macos.dmg
- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: Colomb_server-macos.dmg
path: ./server/Colomb_server-macos.dmg

- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: Colomb_server-macos.zip
path: ./server/Colomb-macos.zip

release-server-windows:
runs-on: windows-latest
needs: [release-create, date-to-tar, raylib-to-tar, raylibcpp-to-tar, enet-to-tar, zstd-to-tar]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install winget
uses: Cyberboss/install-winget@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: |
cd server
./scripts/install-deps-windows.ps1
- name: Build
run: |
cd server
./scripts/bundle-windows.ps1
- name: Upload To Release
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release-create.outputs.release }} ./server/Colomb_server-windows.zip
gh release upload ${{ needs.release-create.outputs.release }} ./server/Colomb_server-windows.exe
- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: Colomb_server-windows.zip
path: ./server/Colomb_server-windows.zip

- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: Colomb_server-windows.exe
path: ./server/Colomb_server-windows.exe
4 changes: 2 additions & 2 deletions server/scripts/bundle-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cd build || exit 14

cpack --config CPackConfig.cmake -G DragNDrop || (cat "./_CPack_Packages/Darwin/DragNDrop/PreinstallOutput.log" && exit 1)

cp Colomb-Darwin.dmg ../Colomb-macos.dmg
cp Colomb_server-Darwin.dmg ../Colomb_server-macos.dmg

cpack --config CPackSourceConfig.cmake -G ZIP

cp Colomb-Darwin.zip ../Colomb-macos.zip
cp Colomb_server-Darwin.zip ../Colomb_server-macos.zip
4 changes: 2 additions & 2 deletions server/scripts/bundle-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ if ($LASTEXITCODE -ne 0) {
type _CPack_Packages/win64/NSIS/NSISOutput.log
}

Copy-Item Colomb-Windows.exe ../Colomb-windows.exe
Copy-Item Colomb_server-Windows.exe ../Colomb_server-windows.exe

cpack --config CPackSourceConfig.cmake -G ZIP

Copy-Item Colomb-Windows.zip ../Colomb-windows.zip
Copy-Item Colomb_server-Windows.zip ../Colomb_server-windows.zip

cd ..

0 comments on commit 6ff9757

Please sign in to comment.