-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (33 loc) · 1.17 KB
/
deploy.yml
File metadata and controls
44 lines (33 loc) · 1.17 KB
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
36
37
38
39
40
41
42
43
name: Deploy
on:
workflow_dispatch:
inputs:
pushToNuget:
description: 'Push to NuGet'
default: '0'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore ./Source/
- name: Build
run: dotnet build ./Source/ --no-restore --configuration Release
- name: Pack DataAnnotationValuesExtractor
run: dotnet pack ./Source/Library/Pekspro.DataAnnotationValuesExtractor/Pekspro.DataAnnotationValuesExtractor.csproj --verbosity normal --configuration Release --include-symbols /p:ContinuousIntegrationBuild=true
- name: Upload artifacts
uses: actions/upload-artifact@v4.6.2
with:
name: NuGet-packages
path: |
./**/*.nupkg
./**/*.snupkg
- name: Pushing to NuGet.org
if: github.event.inputs.pushToNuget == '1'
run: dotnet nuget push ./Artifacts/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}