90 lines
2.4 KiB
YAML
90 lines
2.4 KiB
YAML
name: Build
|
|
on:
|
|
push:
|
|
branches: master
|
|
pull_request:
|
|
branches: '*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build on dotnet using ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest] #, windows-latest, macOS-latest]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup dotnet
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 5.0.x
|
|
- name: Build project
|
|
run: dotnet build -c Release
|
|
- name: Test project
|
|
run: dotnet test
|
|
publish:
|
|
name: Build Release Package
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Download Repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: ls repo
|
|
run: "ls -la ."
|
|
|
|
- name: cat app.config
|
|
run: "cat ./app.config"
|
|
|
|
- id: get-tag
|
|
name: Get Target Raylib Version
|
|
uses: mavrosxristoforos/get-xml-info@1.0
|
|
with:
|
|
xml-file: "./Raylib-cs/Raylib-cs.csproj"
|
|
xpath: "//TargetRaylibTag"
|
|
|
|
- name: echo tag
|
|
run: echo ${{ steps.get-tag.outputs.info }}
|
|
|
|
- name: Download raylib Release
|
|
uses: robinraju/release-downloader@v1.2
|
|
with:
|
|
repository: "raysan5/raylib"
|
|
tag: ${{ steps.get-tag.outputs.info }}
|
|
fileName: "*"
|
|
|
|
- name: extract win-x64
|
|
uses: montudor/action-zip@v1
|
|
with:
|
|
args: unzip -qq raylib-${{steps.get-tag.outputs.info}}_win64_mingw-w64.zip -d raylib-win64
|
|
|
|
- name: copy win-x64
|
|
uses: canastro/copy-file-action@master
|
|
with:
|
|
source: "raylib-win64/raylib-${{steps.get-tag.outputs.info}}_win64_mingw-w64/lib/raylib.dll"
|
|
target: "Raylib-cs/runtimes/win-x64/native/raylib.dll"
|
|
|
|
- name: extract linux-x64
|
|
run: tar -xvf raylib-${{steps.get-tag.outputs.info}}_linux_amd64.tar.gz -C raylib-linux64
|
|
|
|
- name: output zip dir
|
|
run: "ls -la raylib-linux64"
|
|
|
|
- name: copy win-x64
|
|
uses: canastro/copy-file-action@master
|
|
with:
|
|
source: "raylib-linux/raylib-${{steps.get-tag.outputs.info}}_linux_amd64/lib/raylib.so.${{steps.get-tag.outputs.info}}"
|
|
target: "Raylib-cs/runtimes/linux-x64/native/raylib.so"
|
|
|
|
|
|
- name: output directory
|
|
run: "ls -la ."
|
|
|
|
- name: output native lib directory
|
|
run: "ls -la Raylib-cs/runtimes/linux-x64/native/"
|
|
|
|
|
|
|
|
|
|
|