diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33ff0bb..e19b549 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/server/scripts/bundle-macos.sh b/server/scripts/bundle-macos.sh index abcc0ad..40e1798 100755 --- a/server/scripts/bundle-macos.sh +++ b/server/scripts/bundle-macos.sh @@ -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 diff --git a/server/scripts/bundle-windows.ps1 b/server/scripts/bundle-windows.ps1 index d2a9835..6efe679 100644 --- a/server/scripts/bundle-windows.ps1 +++ b/server/scripts/bundle-windows.ps1 @@ -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 ..