diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index cf5cbb49..c1dd4bf7 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -1,4 +1,4 @@ -name: Build +name: Build OpenBOR on: [push, pull_request] @@ -15,9 +15,9 @@ jobs: fail-fast: false matrix: platform: - - { name: Windows x86, os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 } - - { name: Windows x64, os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 } - - { name: Ubuntu x64, os: ubuntu-latest, shell: sh } + - { name: Windows-x86, os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 } + - { name: Windows-x64, os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 } + - { name: Ubuntu-x64, os: ubuntu-latest, shell: sh } - { name: MacOS, os: macos-latest, shell: sh } steps: @@ -51,18 +51,21 @@ jobs: libogg \ libvpx - uses: actions/checkout@v3 - - name: Configure (CMake) + - name: Configure run: | ${{ matrix.platform.source_cmd }} - cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DPRINT_ALL_VARS=ON \ + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \ ${{ matrix.platform.cmake }} - - name: Build (CMake) + - name: Build run: | ${{ matrix.platform.source_cmd }} cmake --build build/ --config Release --verbose --parallel - - name: Upload Platform + - name: Version + id: vars + run: echo "version_name=$(cat engine/version.txt)" >> $GITHUB_ENV + + - name: Upload uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform.name }} + name: "${{ env.version_name }}_${{ matrix.platform.name }}" path: engine/releases/ - diff --git a/engine/version.sh b/engine/version.sh old mode 100644 new mode 100755 index 477791da..4d1efdfd --- a/engine/version.sh +++ b/engine/version.sh @@ -61,6 +61,7 @@ fi function write_version { rm -rf version.tmp +echo "$VERSION_NAME-v$VERSION_MAJOR.$VERSION_MINOR.$VERSION_BUILD-$VERSION_COMMIT" > version.txt echo "/* * OpenBOR - http://www.ChronoCrash.com * -----------------------------------------------------------------------