Skip to content

Commit

Permalink
Update GitVersion.yml (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
trejjam authored Dec 18, 2024
1 parent 844c052 commit af53afb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.1.1
with:
versionSpec: '5.x'
versionSpec: '6.0.5'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v3.1.1
- run: |
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
- name: Restore with .Net
run: dotnet restore --nologo src
- name: Build with .Net
run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.NuGetVersionV2 }}" src
run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.FullSemVer }}" src
- name: Pack with .Net
run: dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersionV2 }} src/Daktela.HttpClient/Daktela.HttpClient.csproj
run: dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }} src/Daktela.HttpClient/Daktela.HttpClient.csproj
- uses: actions/upload-artifact@v4
with:
name: Nuget-packages-${{ steps.gitversion.outputs.NuGetVersionV2 }}
name: Nuget-packages-${{ steps.gitversion.outputs.FullSemVer }}
path: nuget-packages
- name: Push package to Myget
if: ${{ vars.USE_MYGET == 'true' }}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.1.1
with:
versionSpec: '5.x'
versionSpec: '6.0.5'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v3.1.1
- run: |
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "NuGetPreReleaseTagV2 (not used): ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}"
echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
- name: Restore with .Net
run: dotnet restore --nologo src
- name: Build with .Net
run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.MajorMinorPatch }}" src
run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.FullSemVer }}" src
- name: Pack with .Net
run: dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} src/Daktela.HttpClient/Daktela.HttpClient.csproj
run: dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }} src/Daktela.HttpClient/Daktela.HttpClient.csproj
- uses: actions/upload-artifact@v4
with:
name: Nuget-packages-${{ steps.gitversion.outputs.nuGetVersionV2 }}
name: Nuget-packages-${{ steps.gitversion.outputs.FullSemVer }}
path: nuget-packages
- name: Configure Github Nuget Feed
run: dotnet nuget add source --name github https://nuget.pkg.github.com/aviationexam/index.json
Expand Down
8 changes: 6 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
mode: ContinuousDeployment
continuous-delivery-fallback-tag: nightly
mode: ContinuousDelivery
branches:
main:
increment: Patch
label: nightly
source-branches: [main]
ignore:
sha: []
merge-message-formats: {}

0 comments on commit af53afb

Please sign in to comment.