-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Workflows for Nuget-Publish (#14)
* remove package folder * add publish nuget * change workflow
- Loading branch information
1 parent
0785a72
commit 0c7a82d
Showing
3 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.