getsundir -> setsundir, makes more sense. #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continous deployment for Carmine Impact | |
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
submodules: recursive | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1.0.2 | |
- name: Build for Windows x86 | |
working-directory: ./src/vcpp | |
run: msbuild /p:PlatformToolset=v142 /property:Platform=Win32 /p:Configuration=Release cardboard.sln | |
- name: Build for Windows x64 | |
working-directory: ./src/vcpp | |
run: msbuild /p:PlatformToolset=v142 /property:Platform=x64 /p:Configuration=Release cardboard.sln | |
- name: Get latest launcher binaries | |
uses: i3h/download-release-asset@v1 | |
with: | |
owner: "HarpNetStudios" | |
repo: "CardboardLauncher" | |
tag: "latest" | |
file: "CardboardLauncher.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract and prepare launcher binaries | |
run: | | |
Expand-Archive -Path CardboardLauncher.zip -DestinationPath "." | |
Rename-Item -Path CardboardLauncher.exe -NewName launcher.exe | |
Remove-Item -Path CardboardLauncher.zip | |
- name: Archive Windows binaries | |
run: Compress-Archive -Path .\bin, .\bin64, .\data, .\docs, .\license, .\packages, .\res, .\launcher.exe, .\launcher.json, .\Newtonsoft.Json.dll, .\server_msvc.bat, .\config.cfg, .\init.cfg, .\server-init.cfg, .\restore.cfg -DestinationPath cardboard_windows.zip | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: cardboard_windows | |
path: ./cardboard_windows.zip | |
build-ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
submodules: recursive | |
- name: Install C and C++ header files | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev libcurl4-openssl-dev libenet-dev | |
- name: Run CMake | |
working-directory: . | |
run: cmake CMakeLists.txt | |
- name: Build for Ubuntu | |
working-directory: . | |
run: make | |
- name: Archive Ubuntu binaries | |
run: | | |
cp ./src/cardboard_client bin_unix/linux_64_client | |
cp ./src/cardboard_server bin_unix/linux_64_server | |
zip -r cardboard_ubuntu.zip ./cardboard_unix ./bin_unix ./data ./docs ./license ./packages ./res ./config.cfg, ./init.cfg, ./server-init.cfg, ./restore.cfg | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: cardboard_ubuntu | |
path: ./cardboard_ubuntu.zip | |
release: | |
runs-on: ubuntu-latest | |
needs: [build-windows, build-ubuntu] | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: cardboard_windows | |
- uses: actions/download-artifact@v1 | |
with: | |
name: cardboard_ubuntu | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: true | |
- name: Upload Windows binaries | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./cardboard_windows/cardboard_windows.zip | |
asset_name: cardboard_windows.zip | |
asset_content_type: application/zip | |
- name: Upload Ubuntu binaries | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./cardboard_ubuntu/cardboard_ubuntu.zip | |
asset_name: cardboard_ubuntu.zip | |
asset_content_type: application/zip |