Skip to content

Commit

Permalink
Create artifacts.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sygmei authored Apr 24, 2021
1 parent 308f2ed commit c1e808d
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c1e808d

Please sign in to comment.