-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.69 KB
/
Copy pathnuget.yml
File metadata and controls
53 lines (46 loc) · 1.69 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
44
45
46
47
48
49
50
51
52
53
on:
workflow_call:
inputs:
libary-path:
description: "Path to the Libary which the nuget package should be generated from"
required: true
type: string
version:
description: "Semantic Version to use for the nuget package"
required: true
type: string
dotnet-version:
description: "Specify dotnet version of the libary"
required: false
type: string
default: "6.0.x"
secrets:
token:
required: true
nuget_ro:
required: true
jobs:
build:
runs-on: ubuntu-latest
name: Update NuGet package
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ inputs.dotnet-version }}
- name: Setup nuget
run: dotnet nuget add source https://nuget.pkg.github.com/cloudfactorydk/index.json -n cf-github -u joamla96 -p ${{ secrets.nuget_ro }} --store-password-in-clear-text
- name: DEBUG List nuget sources
run: dotnet nuget list source
- name: Build solution and generate NuGet package
run: |
cd ${{ inputs.libary-path }}
dotnet pack --configuration Release /p:Version=${{ inputs.version }} --output out
- name: Push generated package to GitHub registry
run: |
path=$(find . -name *.nupkg)
dotnet nuget push $path -s https://nuget.pkg.github.com/cloudfactorydk/index.json -k ${TOKEN} --skip-duplicate
env:
TOKEN: ${{ secrets.token }}