-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (27 loc) · 1.18 KB
/
run-create-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Create Release
on:
release:
types:
- created
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PROJECT_NAME: JacksonVeroneze.NET.Pagination
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Test
run: dotnet test -c Release --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Build
run: dotnet build -c Release --no-restore ./src/${{env.PROJECT_NAME}}/${{env.PROJECT_NAME}}.csproj
- name: Pack
run: dotnet pack -c Release --include-source --include-symbols --no-build --no-restore -p:PackageVersion=${{github.event.release.tag_name}} ./src/${{env.PROJECT_NAME}}/${{env.PROJECT_NAME}}.csproj
- name: Publish Package
run: dotnet nuget push --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_PUBLISH_KEY}} ./src/${{env.PROJECT_NAME}}/bin/Release/${{env.PROJECT_NAME}}.${{github.event.release.tag_name}}.nupkg