Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish nuget packages #16

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will publish the nuget packages when a relase is created

name: .NET

on:
release:
types: [published, prereleased, released]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Create package
run: |
dotnet pack $(project_path) -c Release --include-symbols -o artifacts -p:PackageVersion=${{ github.event.release.tag_name }} -p:PackageReleaseNotes=${{ github.event.release.description }}

- name: Upload NuGet package (requires secret)
run: |
dotnet nuget push artifacts/PipelineNet.${{ github.event.release.tag_name }}.nupkg --source $NUGET_SOURCE --api-key $NUGET_API_KEY
dotnet nuget push artifacts/PipelineNet.${{ github.event.release.tag_name }}.symbols.nupkg --source $NUGET_SOURCE --api-key $NUGET_API_KEY
env:
project_path: src/PipelineNet/PipelineNet.csproj
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} # Replace with your NuGet source (public or private)
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} # Replace with your NuGet API key (stored as secret)
Loading