From 1913b8ab279ec29d017625e3feebf65d11cfd887 Mon Sep 17 00:00:00 2001
From: Simon <25969+snovak7@users.noreply.github.com>
Date: Thu, 7 Aug 2025 23:26:44 +0200
Subject: [PATCH 1/3] chore: Remove GitVersion.MsBuild, enhance workflows for
release handling and versioning
---
.github/workflows/build.yml | 8 +++++++-
.github/workflows/release-drafter.yml | 11 +++++++++++
Directory.Packages.props | 4 ----
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d72c3b8..eef9f11 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -29,11 +29,17 @@ jobs:
dotnet-version: |
9.x
+ - name: Set VERSION variable from tag
+ run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
+
+ - name: Read VERSION variable
+ run: echo "${VERSION}"
+
- name: Restore .NET Packages
run: dotnet restore
- name: Build .NET Solution
- run: dotnet build --configuration Release --no-restore
+ run: dotnet build --configuration Release --no-restore /p:Version=${VERSION}
- name: Test .NET Solution
run: dotnet test --configuration Release --no-build --filter="Category=UnitTest|Category=IntegrationTest" --logger "trx;LogFilePrefix=test-results"
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
index 2ee3727..bfb9358 100644
--- a/.github/workflows/release-drafter.yml
+++ b/.github/workflows/release-drafter.yml
@@ -19,6 +19,15 @@ on:
options:
- release
- prerelease
+ identifier:
+ type: string
+ default: rc
+ description: Pre-Release Identifier
+ required: false
+ include-pre-releases:
+ type: boolean
+ default: true
+ description: Include Pre-Releases
concurrency:
group: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref }}
@@ -36,5 +45,7 @@ jobs:
uses: release-drafter/release-drafter@v6.1.0
with:
prerelease: ${{ github.event.inputs.release-type != 'release' }}
+ prerelease-identifier: ${{ github.event.inputs.identifier }}
+ include-pre-releases: ${{ github.event.inputs.include-pre-releases }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 9aa2e02..c1772f1 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -5,9 +5,5 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
From 44ace7fa7f87ebfccfb56bce910f919518474714 Mon Sep 17 00:00:00 2001
From: Simon <25969+snovak7@users.noreply.github.com>
Date: Thu, 7 Aug 2025 23:30:56 +0200
Subject: [PATCH 2/3] chore: Enhance build workflow to improve version handling
logic during releases
---
.github/workflows/build.yml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index eef9f11..1516371 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -30,10 +30,11 @@ jobs:
9.x
- name: Set VERSION variable from tag
- run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
+ run: echo "VERSION=${{ github.event.release.tag_name}}" >> $GITHUB_ENV
+ if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
- name: Read VERSION variable
- run: echo "${VERSION}"
+ run: echo "${VERSION:0.0.0}"
- name: Restore .NET Packages
run: dotnet restore
From 02463c8c9506ea5cf955987e6e9da632de6ce62f Mon Sep 17 00:00:00 2001
From: Simon <25969+snovak7@users.noreply.github.com>
Date: Thu, 7 Aug 2025 23:33:03 +0200
Subject: [PATCH 3/3] chore: Update build workflow to set default VERSION and
improve version handling logic
---
.github/workflows/build.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1516371..3fcfda3 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -29,12 +29,15 @@ jobs:
dotnet-version: |
9.x
+ - name: Set Default VERSION
+ run: echo "VERSION=0.0.0" >> $GITHUB_ENV
+
- name: Set VERSION variable from tag
run: echo "VERSION=${{ github.event.release.tag_name}}" >> $GITHUB_ENV
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
- name: Read VERSION variable
- run: echo "${VERSION:0.0.0}"
+ run: echo "${VERSION}"
- name: Restore .NET Packages
run: dotnet restore