Skip to content

Commit

Permalink
Fix versioning in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Feb 17, 2024
1 parent a8f8cc4 commit d038434
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:

- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
id: gitversion
with:
useConfigFile: true

Expand Down Expand Up @@ -76,8 +77,9 @@ jobs:
dotnet pack
--configuration Release
--no-build
--output $GITHUB_WORKSPACE/drop
-p:PackageVersion=$GITVERSION_NUGETVERSION
--output ${{ github.workspace }}/drop
-p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}
-p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersion }}
- name: Publish Artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -107,7 +109,7 @@ jobs:
- name: Publish to private feed
# if: startsWith(github.ref, 'refs/tags/')
run: >
dotnet nuget push "$GITHUB_WORKSPACE/drop/*"
dotnet nuget push "${{ github.workspace }}/drop/*"
-k ${{ secrets.PRIVATE_FEED_API_KEY }}
--skip-duplicate
Expand All @@ -133,6 +135,6 @@ jobs:
- name: Publish to NuGet.org
# if: startsWith(github.ref, 'refs/tags/')
run: >
dotnet nuget push "$GITHUB_WORKSPACE/drop/*"
dotnet nuget push "${{ github.workspace }}/drop/*"
-k ${{ secrets.NUGET_API_KEY }}
--skip-duplicate
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:

- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
id: gitversion
with:
useConfigFile: true

Expand Down Expand Up @@ -76,8 +77,9 @@ jobs:
dotnet pack
--configuration Release
--no-build
--output $GITHUB_WORKSPACE/drop
-p:PackageVersion=$GITVERSION_NUGETVERSION
--output ${{ github.workspace }}/drop
-p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}
-p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersion }}
- name: Publish Artifact
uses: actions/upload-artifact@v4
Expand All @@ -88,6 +90,6 @@ jobs:
- name: Publish to NuGet.org
if: startsWith(github.ref, 'refs/tags/')
run: >
dotnet nuget push "$GITHUB_WORKSPACE/drop/*"
dotnet nuget push "${{ github.workspace }}/drop/*"
-k ${{ secrets.NUGET_API_KEY }}
--skip-duplicate
4 changes: 0 additions & 4 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<PropertyGroup>
<VersionPrefix Condition="'$(GITVERSION_NUGETVERSION)' != ''">$(GITVERSION_NUGETVERSION)</VersionPrefix>
</PropertyGroup>

<PropertyGroup Condition="$(MSBuildProjectName.StartsWith('Tingle.AspNetCore.'))">
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
Expand Down

0 comments on commit d038434

Please sign in to comment.