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.
Merge pull request #18 from kurmann/17-add-nuget-workflow-template-fo…
…r-entity-lib-as-well 17 add nuget workflow template for entity lib as well
- Loading branch information
Showing
4 changed files
with
124 additions
and
10 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
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
31 changes: 31 additions & 0 deletions
31
templates/entitylib-github-workflow/.github/workflows/dotnet.yml
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,31 @@ | ||
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/Entities/Entities.csproj | ||
|
||
- name: Pack Entities | ||
run: dotnet pack src/Entities/Entities.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 |
38 changes: 38 additions & 0 deletions
38
templates/entitylib-github-workflow/.template.config/template.json
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", | ||
"GitHubActions" | ||
], | ||
"identity": "Kurmann.Videoschnitt.EntityLib.GitHubWorkfow", | ||
"name": "Entity Library GitHub Workflow", | ||
"shortName": "entitylib-github-workflow", | ||
"sourceName": "EntityLib.GitHubWorkfow", | ||
"description": "Creates a GitHub Actions workflow for publishing a entity library 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" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |