aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2023-10-16 13:51:24 +0100
committerGitHub <noreply@github.com>2023-10-16 14:51:24 +0200
commitd463a434746cab295c4db57001650b623bd481b1 (patch)
treecea8845111c10144f89c3ba542879da37f5b0a3e /.github/workflows/ci.yml
parentf763e66a1ffcb4cd8a06e30ad9de15a4c5139f4b (diff)
downloadNorthstarLauncher-d463a434746cab295c4db57001650b623bd481b1.tar.gz
NorthstarLauncher-d463a434746cab295c4db57001650b623bd481b1.zip
Use 4th digit in version number for CI build number (#541)v1.19.9-rc3v1.19.9-rc2v1.19.9-rc1v1.19.9
Sets the 4th digit of the version number to the current CI run number. This is done to more easily link a binary back to the PR or commit it came from.
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 89755174..09af4df7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,6 +3,7 @@ on: [push, pull_request]
env:
BUILD_PROFILE: Release
+ NORTHSTAR_VERSION: 0.0.0.${{github.run_number}}
jobs:
build:
@@ -16,6 +17,13 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1
- name: Configure cmake
run: cmake -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="${{ env.BUILD_PROFILE }}"
+ - name: Setup resource file version
+ shell: bash
+ run: |
+ sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' NorthstarLauncher/resources.rc
+ sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' NorthstarDLL/resources.rc
+ FILEVERSION=$(echo ${{ env.NORTHSTAR_VERSION }} | tr '.' ',' | sed -E 's/-rc[0-9]+//' | tr -d '[:alpha:]')
+ sed -i "s/0,0,0,1/${FILEVERSION}/g" NorthstarDLL/ns_version.h
- name: Build
run: cmake --build .
- name: Extract Short Commit Hash