Skip to content

Commit

Permalink
Updated GitHub workflow for building & publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
lethek committed Aug 6, 2023
1 parent f19a78d commit 9f74ac1
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ jobs:
fetch-depth: 0

- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v0.9.15
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: 5.x

- name: Execute GitVersion
uses: gittools/actions/gitversion/execute@v0.9.15
uses: gittools/actions/gitversion/execute@v0.10.2
id: gitversion
with:
additionalArguments: /output BuildServer
useConfigFile: true

- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
Expand All @@ -46,7 +46,7 @@ jobs:
run: dotnet test -c ${{ env.buildConfiguration }} --no-build -v normal --filter FullyQualifiedName!~IntegrationTests

- name: Pack
run: dotnet pack -c ${{ env.buildConfiguration }} -o "${{ github.workspace }}/artifacts/" -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}
run: dotnet pack -c ${{ env.buildConfiguration }} -p:PackageOutputPath="${{ github.workspace }}/artifacts/" -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}

- name: Upload
uses: actions/upload-artifact@v3
Expand All @@ -56,16 +56,8 @@ jobs:
${{ github.workspace }}/artifacts/*.nupkg
${{ github.workspace }}/artifacts/*.snupkg
- name: Push (Pre-release)
if: ${{ steps.gitversion.outputs.nuGetPreReleaseTag != '' }}
uses: KnicKnic/[email protected]
with:
linux: dotnet nuget push "${{ github.workspace }}/artifacts/*.nupkg" -s ${{ secrets.MYGET_SOURCE }} -k ${{ secrets.MYGET_API_KEY }} --skip-duplicate
windows: dotnet nuget push "${{ github.workspace }}\artifacts\*.nupkg" -s ${{ secrets.MYGET_SOURCE }} -k ${{ secrets.MYGET_API_KEY }} --skip-duplicate

- name: Push (Release)
if: ${{ steps.gitversion.outputs.nuGetPreReleaseTag == '' }}
uses: KnicKnic/[email protected]
- name: Push
uses: lethek/[email protected]
with:
linux: dotnet nuget push "${{ github.workspace }}/artifacts/*.nupkg" -s ${{ secrets.NUGET_SOURCE }} -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
windows: dotnet nuget push "${{ github.workspace }}\artifacts\*.nupkg" -s ${{ secrets.NUGET_SOURCE }} -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate

0 comments on commit 9f74ac1

Please sign in to comment.