Skip to content

Commit b3083cd

Browse files
authored
Merge pull request #15 from escendit/14-remove-gitversion
Remove GitVersion
2 parents f77c844 + 02463c8 commit b3083cd

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,21 @@ jobs:
2929
dotnet-version: |
3030
9.x
3131
32+
- name: Set Default VERSION
33+
run: echo "VERSION=0.0.0" >> $GITHUB_ENV
34+
35+
- name: Set VERSION variable from tag
36+
run: echo "VERSION=${{ github.event.release.tag_name}}" >> $GITHUB_ENV
37+
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
38+
39+
- name: Read VERSION variable
40+
run: echo "${VERSION}"
41+
3242
- name: Restore .NET Packages
3343
run: dotnet restore
3444

3545
- name: Build .NET Solution
36-
run: dotnet build --configuration Release --no-restore
46+
run: dotnet build --configuration Release --no-restore /p:Version=${VERSION}
3747

3848
- name: Test .NET Solution
3949
run: dotnet test --configuration Release --no-build --filter="Category=UnitTest|Category=IntegrationTest" --logger "trx;LogFilePrefix=test-results"

.github/workflows/release-drafter.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ on:
1919
options:
2020
- release
2121
- prerelease
22+
identifier:
23+
type: string
24+
default: rc
25+
description: Pre-Release Identifier
26+
required: false
27+
include-pre-releases:
28+
type: boolean
29+
default: true
30+
description: Include Pre-Releases
2231

2332
concurrency:
2433
group: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref }}
@@ -36,5 +45,7 @@ jobs:
3645
uses: release-drafter/release-drafter@v6.1.0
3746
with:
3847
prerelease: ${{ github.event.inputs.release-type != 'release' }}
48+
prerelease-identifier: ${{ github.event.inputs.identifier }}
49+
include-pre-releases: ${{ github.event.inputs.include-pre-releases }}
3950
env:
4051
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Directory.Packages.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,5 @@
55
<PrivateAssets>all</PrivateAssets>
66
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
77
</PackageReference>
8-
<PackageReference Include="GitVersion.MsBuild" Version="6.3.0">
9-
<PrivateAssets>all</PrivateAssets>
10-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
11-
</PackageReference>
128
</ItemGroup>
139
</Project>

0 commit comments

Comments
 (0)