Skip to content

- Fix crash on missing images folder #153

- Fix crash on missing images folder

- Fix crash on missing images folder #153

Workflow file for this run

name: GitHub CI
# Taken from https://github.com/Cxbx-Reloaded/Cxbx-Reloaded
on:
push:
paths-ignore:
- '.gitattributes'
- '.github/*'
- '.github/*_TEMPLATE/**'
- '.gitignore'
- '*.bat'
- '*.yml'
- 'doc/**'
pull_request:
paths-ignore:
- '.gitattributes'
- '.github/*'
- '.github/*_TEMPLATE/**'
- '.gitignore'
- '*.bat'
- '*.yml'
- 'doc/**'
jobs:
build-windows:
name: Build (Windows, ${{ matrix.configuration }}, VS${{ matrix.vsver }}) # runner.os doesn't work here
runs-on: windows-${{ matrix.vsver }}
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
matrix:
configuration: [Release, Debug]
vsver: [2022]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: |
mkdir build && cd build
cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
cmake --build . --config ${{ matrix.configuration }}
shell: cmd
- uses: actions/upload-artifact@v3
with:
name: YACardEmu-${{ matrix.configuration }}
path: build/${{ matrix.configuration }}
if-no-files-found: error
release:
if: |
github.event.action != 'pull_request' &&
github.ref == 'refs/heads/master' &&
github.repository == 'GXTX/YACardEmu'
needs: build-windows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Re-zip artifacts
id: zip
run: |
for artifact in artifacts/*; do
7z a ${artifact}.zip "./${artifact}/*"
if [ $(stat -c %s ${artifact}.zip) -le 100000 ]; then
echo "Error: Archive ${artifact}.zip too small!"
exit 1
fi
done
echo "::set-output name=tag_name::CI-${GITHUB_SHA::7}"
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ steps.zip.outputs.tag_name }} artifacts/*.zip -p --target $GITHUB_SHA --title '${{ steps.zip.outputs.tag_name }}'