From f0527fa888bf6ac01f9b8534e5407691b28d34f6 Mon Sep 17 00:00:00 2001 From: Kilian von Pflugk Date: Sat, 21 Sep 2024 18:42:55 +0200 Subject: [PATCH] inject git hash directly --- .github/workflows/build.yml | 4 +++- .github/workflows/release.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 702e333..ac50b21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,9 @@ jobs: run: dotnet restore - name: Embed version info - run: echo "${{ github.sha }}" > ConfusedPolarBear.Plugin.IntroSkipper/Configuration/version.txt + run: | + GITHUB_SHA=${{ github.sha }} + sed -i "s/string\.Empty/\"$GITHUB_SHA\"/g" ConfusedPolarBear.Plugin.IntroSkipper/Helper/Commit.cs - name: Retrieve commit identification run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28ba042..5ddaf42 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,9 @@ jobs: run: node update-version.js - name: Embed version info - run: echo "${{ github.sha }}" > ConfusedPolarBear.Plugin.IntroSkipper/Configuration/version.txt + run: | + GITHUB_SHA=${{ github.sha }} + sed -i "s/string\.Empty/\"$GITHUB_SHA\"/g" ConfusedPolarBear.Plugin.IntroSkipper/Helper/Commit.cs - name: Build run: dotnet build --configuration Release --no-restore