Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Update build.yml

Update build.yml #43

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, windows-latest]
steps:
- name: Install Dependencies Linux
if: runner.os == 'Linux'
run: sudo apt-get -yq update && sudo apt-get -yq install cmake libsdl2-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavdevice-dev
- name: Checkout
uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package
if: runner.os == 'Windows' && github.ref == 'refs/heads/main'
run: |
cd build
cpack
- name: Publish
if: runner.os == 'Windows' && github.ref == 'refs/heads/main'
uses: ncipollo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactErrorsFailBuild: true
prerelease: true
removeArtifacts: true
tag: latest
commit: main
name: "Development Build"
artifacts: "${{github.workspace}}/build/dist/*.*"