Skip to content

Commit

Permalink
Merge pull request #320 from SumolX/git-workflow-release
Browse files Browse the repository at this point in the history
Added version info to artifacts
  • Loading branch information
SumolX authored May 18, 2024
2 parents c4fcb01 + df5cc13 commit be42a2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build OpenBOR

on: [push, pull_request]

Expand All @@ -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:
Expand Down Expand Up @@ -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/

1 change: 1 addition & 0 deletions engine/version.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
* -----------------------------------------------------------------------
Expand Down

0 comments on commit be42a2c

Please sign in to comment.