v2.0.5 #6
Workflow file for this run
This file contains hidden or 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
name: Publish NuGet Package | |
on: | |
release: | |
types: [created] # Se déclenche quand une release est créée | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '9.0.x' # Remplace par la version de ton projet | |
- name: Restore dependencies | |
run: dotnet restore src/ | |
- name: Build project | |
run: dotnet build src/ --configuration Release --no-restore | |
- name: Pack NuGet package | |
run: dotnet pack src/ --configuration Release --no-build --output ./nupkg | |
- name: Publish to NuGet | |
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |