Skip to content

Commit

Permalink
Add NuGet publish GH action [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticmind committed Dec 29, 2023
1 parent d16b619 commit f51412d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/nuget-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: NuGet Manual Publish

on: [workflow_dispatch]

env:
config: Release
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

jobs:
publish_job:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Run Pack
run: dotnet pack src/ReverseMarkdown/ReverseMarkdown.csproj -c Release
shell: bash

- name: Publish to NuGet
run: |
find . -name '*.nupkg' -exec dotnet nuget push "{}" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate \;
# find . -name '*.snupkg' -exec dotnet nuget push "{}" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} \;
shell: bash


0 comments on commit f51412d

Please sign in to comment.