Skip to content

Commit

Permalink
fix: remove package validation and enable powershell
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsusi committed Apr 11, 2024
1 parent e60f7c3 commit 4341028
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: dotnet test --no-build --configuration Release --verbosity normal
- name: Package
run: dotnet pack --no-build --configuration Release --output ${{ env.NuGetDirectory }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget
if-no-files-found: error
Expand All @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: nuget
path: ${{ env.NuGetDirectory }}
Expand All @@ -61,13 +61,8 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Install nuget validator
run: dotnet tool update Meziantou.Framework.NuGetPackageValidation.Tool --global

- name: Validate package
run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg")

- name: Publish NuGet package
shell: pwsh
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
Expand Down

0 comments on commit 4341028

Please sign in to comment.