Skip to content

Commit

Permalink
fix: NuGet package deployer (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender authored Nov 15, 2023
1 parent c166ad7 commit 68a98d4
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ jobs:
dotnet-version: "8.x"
dotnet-quality: "ga"

- run: echo "Building $COMPOSED_VERSION ..."

- name: Build library
run: >
dotnet build src/Indicators.csproj
Expand Down Expand Up @@ -124,6 +122,12 @@ jobs:
echo "| Version ID | ${{ needs.build.outputs.version }} |"
} >> $GITHUB_STEP_SUMMARY
- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"
dotnet-quality: "ga"

- name: Install NuGet tool
uses: nuget/setup-nuget@v1
with:
Expand All @@ -139,19 +143,22 @@ jobs:
- name: Publish to Azure Artifacts
if: inputs.environment == 'azure-artifacts'
run: |
nuget sources Add -Name "AzureArtifacts" -Source ${{ vars.NUGET_PUBLISH_URL }} -UserName DaveSkender -Password ${{ secrets.NUGET_TOKEN }} -NonInteractive
nuget push NuGet/*.nupkg -src AzureArtifacts -ApiKey AZ
dotnet new nugetconfig --force
nuget sources Add -Name "AzureArtifacts" -Source ${{ vars.NUGET_PUBLISH_URL }} -UserName DaveSkender -Password ${{ secrets.NUGET_TOKEN }} -NonInteractive -ConfigFile nuget.config
nuget push NuGet/*.nupkg -src AzureArtifacts -ApiKey AZ -NonInteractive -ConfigFile nuget.config
- name: Publish to NuGet.org
if: inputs.environment == 'nuget'
run: |
nuget push NuGet/*.nupkg -Source ${{ vars.NUGET_PUBLISH_URL }} -ApiKey AZ -NonInteractive
dotnet new nugetconfig --force
nuget setApiKey ${{ secrets.NUGET_TOKEN }} -src nuget -ConfigFile nuget.config
nuget push NuGet/*.nupkg -src nuget -NonInteractive -ConfigFile nuget.config -Verbosity Detailed
- name: Tag and draft release note
uses: ncipollo/release-action@v1
if: inputs.environment == 'nuget'
with:
body: "We’ve released a new Stock Indicators for .NET NuGet package. See [Skender.Stock.Indicators @ NuGet.org](https://www.nuget.org/packages/Skender.Stock.Indicators/${{ needs.build.outputs.nuget-version }}) for more information."
body: "We’ve released a new Stock Indicators for .NET NuGet package. See [Skender.Stock.Indicators @ NuGet.org](${{ vars.NUGET_DOWNLOAD_PREFIX }}${{ needs.build.outputs.version }}) for more information."
generateReleaseNotes: true
draft: true
makeLatest: ${{ !inputs.preview }}
Expand Down

0 comments on commit 68a98d4

Please sign in to comment.