Skip to content

Commit

Permalink
Change for a nuget template
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemy191 committed Aug 31, 2023
1 parent b465e95 commit 5bc5537
Show file tree
Hide file tree
Showing 11 changed files with 660 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/Publish to Nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to Nuget
on:
release:
types:
- published
env:
Version: ${{ github.event.release.tag_name }}
PackageFile: {{cookiecutter.name}}.${{ github.event.release.tag_name }}.nupkg

jobs:
create_nuget:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3

- name: Pack
run: dotnet pack --configuration Release -p:PackageVersion=${{ env.Version }} --output .

- name: Publish NuGet package
run: dotnet nuget push ${{ env.PackageFile }} --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
21 changes: 21 additions & 0 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on:
push:
branches: ['main']
pull_request:
branches: [ "*" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3

- name: Test
run: dotnet test --verbosity normal
Loading

0 comments on commit 5bc5537

Please sign in to comment.