Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
SushilMallRC committed May 13, 2024
1 parent 1a195e2 commit 7a957ea
Showing 1 changed file with 7 additions and 29 deletions.
36 changes: 7 additions & 29 deletions .github/workflows/release-with-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,11 @@ jobs:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Create NuGet package
run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
- name: Build and pack
run: dotnet build --configuration Release
dotnet pack --configuration Release --output ./output --no-build
- name: Publish to NuGet
uses: NuGet/nuget-push-action@v1
with:
name: nuget
if-no-files-found: error
retention-days: 7
path: ${{ env.NuGetDirectory }}/*.nupkg

Publish_NuGet:
runs-on: macos-latest
needs: [ Create_Nuget]
steps:
# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v4
with:
name: nuget
path: ${{ env.NuGetDirectory }}



# Publish all NuGet packages to NuGet.org
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
# If you retry a failed workflow, already published packages will be skipped without error.
- name: Publish NuGet package
run: |
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
}
nuget_key: ${{ secrets.NUGET_APIKEY }} # Make sure to set this secret in your repository settings
nuget_package: './output/*.nupkg'

0 comments on commit 7a957ea

Please sign in to comment.