-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (75 loc) · 2.42 KB
/
publish.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: publish
env:
configuration: Release
dotnet_version: 5.0.x
source_url: https://nuget.pkg.github.com/kamacharovs/index.json
project_data: kamafi.core.data
project_middleware: kamafi.core.middleware
project_services: kamafi.core.services
on:
push:
branches: [ main ]
jobs:
publish-data:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet_version }}
source-url: ${{ env.source_url }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: build
run: dotnet build ${{ env.project_data }} -c ${{ env.configuration }}
- name: generate
run: |
cd ${{ env.project_data }}
dotnet pack -c ${{ env.configuration }} -o out
- name: push
run: |
dotnet nuget push ./${{ env.project_data }}/out/*.nupkg --skip-duplicate -n true -k ${{ secrets.PACKAGE_TOKEN }}
publish-middleware:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet_version }}
source-url: ${{ env.source_url }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: build
run: dotnet build ${{ env.project_middleware }} -c ${{ env.configuration }}
- name: generate
run: |
cd ${{ env.project_middleware }}
dotnet pack -c ${{ env.configuration }} -o out
- name: push
run: |
dotnet nuget push ./${{ env.project_middleware }}/out/*.nupkg --skip-duplicate -n true -k ${{ secrets.PACKAGE_TOKEN }}
publish-services:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet_version }}
source-url: ${{ env.source_url }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: build
run: dotnet build ${{ env.project_services }} -c ${{ env.configuration }}
- name: generate
run: |
cd ${{ env.project_services }}
dotnet pack -c ${{ env.configuration }} -o out
- name: push
run: |
dotnet nuget push ./${{ env.project_services }}/out/*.nupkg --skip-duplicate -n true -k ${{ secrets.PACKAGE_TOKEN }}