This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
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.
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 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,35 @@ | ||
name: .NET CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build_and_pack: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.0.x' | ||
|
||
- name: Restore dependencies for Module | ||
run: dotnet restore src/Module/Module.csproj | ||
|
||
# Optional: Ausführen der Tests | ||
# - name: Test | ||
# run: dotnet test src/Tests/Tests.csproj --no-build --verbosity normal | ||
|
||
- name: Pack Module | ||
run: dotnet pack src/Module/Module.csproj --output ./nupkgs | ||
|
||
# Veröffentlichen der NuGet-Pakete | ||
- name: Push NuGet and Symbol Packages | ||
run: | | ||
dotnet nuget push ./nupkgs/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | ||
dotnet nuget push ./nupkgs/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
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,38 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/template", | ||
"author": "Patrick Kurmann", | ||
"classifications": [ | ||
"Common", | ||
"GitHub Actions" | ||
], | ||
"identity": "Kurmann.AutomateVideoPublishing.ServiceCollectionIntegratedModule.NuGetWorkflow", | ||
"name": "Service Collection Integrated Module NuGet Workflow", | ||
"shortName": "nugetworkflow", | ||
"sourceName": "ServiceCollectionIntegratedModule.NuGetWorkflow", | ||
"description": "Creates a GitHub Actions workflow for publishing a Service Collection Integrated Module to NuGet.org.", | ||
"tags": { | ||
"language": "YAML", | ||
"type": "item" | ||
}, | ||
"preferNameDirectory": true, | ||
"sources": [ | ||
{ | ||
"modifiers": [ | ||
{ | ||
"exclude": [ | ||
".vs/**", | ||
".template_config/**", | ||
"**/bin/**", | ||
"**/obj/**", | ||
"/bin/**", | ||
"/obj/**", | ||
".git/**", | ||
"Readme.md", | ||
"LICENSE", | ||
"nuget.csproj" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |