Skip to content

Commit

Permalink
Updated github actions workflow for building and publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
lethek committed Aug 10, 2023
1 parent 63c508b commit 66d0e50
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 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 @@ -56,19 +56,10 @@ jobs:
${{ github.workspace }}/artifacts/*.nupkg
${{ github.workspace }}/artifacts/*.snupkg
- name: Push (Pre-release)
env:
MYGET_SOURCE: ${{ secrets.MYGET_SOURCE }}
if: ${{ steps.gitversion.outputs.nuGetPreReleaseTag != '' && env.MYGET_SOURCE != '' }}
uses: lethek/os-specific-run@v1.0.6
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)
- name: Push
env:
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
if: ${{ steps.gitversion.outputs.nuGetPreReleaseTag == '' && env.NUGET_SOURCE != '' }}
if: ${{ env.NUGET_SOURCE != '' }}
uses: lethek/os-specific-run@v1.0.6
with:
linux: dotnet nuget push "${{ github.workspace }}/artifacts/*.nupkg" -s ${{ secrets.NUGET_SOURCE }} -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
Expand Down

0 comments on commit 66d0e50

Please sign in to comment.