From c1e808dfb8eaedb1fcfa4436396d168c8ab4dbcf Mon Sep 17 00:00:00 2001 From: Sygmei <3835355+Sygmei@users.noreply.github.com> Date: Sat, 24 Apr 2021 03:32:59 +0200 Subject: [PATCH] Create artifacts.yml --- .github/workflows/artifacts.yml | 98 +++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .github/workflows/artifacts.yml diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml new file mode 100644 index 0000000..7b7168a --- /dev/null +++ b/.github/workflows/artifacts.yml @@ -0,0 +1,98 @@ +name: artifacts + +on: + release: + types: [created] + +jobs: + release_linux: + name: Release ObEngine Linux package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Create build directory + run: mkdir build + - name: Aptitude update + run: sudo apt-get update + - name: Install CMake + run: sudo apt-get install -y cmake + - name: Install G++ and build-essential + run: sudo apt-get install -y build-essential g++ + - name: Compile TiledIntegration + run: cd build; cmake ..; make -j8 + - name: Create package + run: cp ./build/Release/tiled_integration release/ + - name: Package to archive + run: tar -cvf obengine-tiled-integration.tar release/ ; gzip -9 obengine-tiled-integration.tar + - name: Upload Release Asset + id: upload-release-asset-linux + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./obengine-tiled-integration.tar + asset_name: obengine-tiled-integration.linux64.tar.gz + asset_content_type: application/zip + + + release_windows: + name: Release ObEngine Windows package + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Create build directory + run: mkdir build + - name: Run CMake on TiledIntegration + run: cd build; cmake -G "Visual Studio 16 2019" -A x64 .. + shell: pwsh + - name: Compile TiledIntegration + run: cmake --build build --config Release -- /m:8 + - name: Create package + run: cp ./build/Release/tiled_integration.exe ./release/ + shell: pwsh + - name: Package to archive + run: Compress-Archive -path ./release/* -destinationpath obengine-tiled-integration.zip -compressionlevel optimal + - name: Upload Release Asset + id: upload-release-asset-win + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./obengine-tiled-integration.zip + asset_name: obengine-tiled-integration.win64.zip + asset_content_type: application/zip + + + release_macos: + name: Release ObEngine MacOS package + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Create build directory + run: mkdir build + - name: Run CMake on TiledIntegration + run: cd build && cmake .. + - name: Compile TiledIntegration + run: cd build && make -j8 + - name: Create package + run: cp ./build/Release/tiled_integration release/ + - name: Package to archive + run: tar -cvf obengine-tiled-integration.tar release/ ; gzip -9 obengine-tiled-integration.tar + - name: Upload Release Asset + id: upload-release-asset-macos + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./obengine-tiled-integration.tar + asset_name: obengine-tiled-integration.macos64.tar.gz + asset_content_type: application/zip