-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rename dotnet.yml to build.yml * Publish nuget packages on release
- Loading branch information
1 parent
52a40b3
commit e7e0f79
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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,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) |