Skip to content

Commit

Permalink
Create Workflows for Nuget-Publish (#14)
Browse files Browse the repository at this point in the history
* remove package folder

* add publish nuget

* change workflow
  • Loading branch information
CKrowiorsch committed Apr 5, 2023
1 parent 0785a72 commit 0c7a82d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yaml
@@ -0,0 +1,32 @@
name: publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x.x
- run: dotnet pack -o dist -c Release "Source/MediaAccount.Client/MediaAccount.Client.csproj"

# - name: Publish package to NuGet.org
# uses: nuget/setup-nuget@v1
# with:
# nuget-api-key: ${{ secrets.NUGET_KEY }}
# nuget-packages: dist/*.nupkg

- name: Publish NuGet package
run: |
foreach($file in (Get-ChildItem "dist" -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.NUGET_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
}
3 changes: 0 additions & 3 deletions Packages/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions Packages/repositories.config

This file was deleted.

0 comments on commit 0c7a82d

Please sign in to comment.