-
Notifications
You must be signed in to change notification settings - Fork 65
103 lines (80 loc) · 4.77 KB
/
dotnet-build.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
93
94
95
96
97
98
99
100
101
102
103
name: Package up.
on:
push:
branches: [ "v12/main" ]
pull_request:
branches: [ "v12/main" ]
jobs:
build:
runs-on: windows-latest
env:
CONFIG: 'Release'
SOLUTION_FILE: './uSync.sln'
OUT_FOLDER: './build.out/'
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.304"
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Determine Version with GitVersion (MSBuild in Proj will do this)
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.15
with:
useConfigFile: true
configFilePath: ./GitVersion.yml
- name: Restore npm
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm install
- name: Display GitVersion SemVer
run: |
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
# ------------------------
# actual builds / packages
# ------------------------
- name: Restore
run: dotnet restore ./uSync/uSync.csproj
- name: tests
run: dotnet test ./uSync.Tests/uSync.Tests.csproj
- name: Generate AppSettings Schema
run: dotnet run -c ${{env.Config}} --project ./uSync.SchemaGenerator/uSync.SchemaGenerator.csproj
- name: Build uSync.Core
run: dotnet pack ./uSync.Core/uSync.Core.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
- name: Build uSync.Community.Contrib
run: dotnet pack ./uSync.Community.Contrib/uSync.Community.Contrib.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
- name: Build uSync.DataTypeSerializers
run: dotnet pack ./uSync.Community.DataTypeSerializers/uSync.Community.DataTypeSerializers.csproj -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
- name: Build uSync.BackOffice
run: dotnet pack ./uSync.BackOffice/uSync.BackOffice.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
- name: Build uSync.BackOfficeAssets
run: dotnet pack ./uSync.BackOffice.Assets/uSync.BackOffice.Assets.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
- name: Build uSync.BackOfficeTargets
run: dotnet pack ./uSync.BackOffice.Targets/uSync.BackOffice.Targets.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
- name: Build uSync
run: dotnet pack ./uSync/uSync.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
- name: Upload nuget file as build artifact
uses: actions/upload-artifact@v2
with:
name: Nuget Build Output
path: ${{env.OUT_FOLDER}}
# can't use wilecards with dotnet nuget command
- name: Push to Jumoo GitHub Nuget Repo
if: ${{ github.event_name != 'pull_request' }}
run: |
dotnet nuget push ./build.out/uSync.${{steps.gitversion.outputs.fullSemVer}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/kevinjump/index.json --api-key ${{ github.token }}
dotnet nuget push ./build.out/uSync.Core.${{steps.gitversion.outputs.fullSemVer}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/kevinjump/index.json --api-key ${{ github.token }}
dotnet nuget push ./build.out/uSync.BackOffice.${{steps.gitversion.outputs.fullSemVer}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/kevinjump/index.json --api-key ${{ github.token }}
dotnet nuget push ./build.out/uSync.BackOffice.Assets.${{steps.gitversion.outputs.fullSemVer}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/kevinjump/index.json --api-key ${{ github.token }}
dotnet nuget push ./build.out/uSync.BackOffice.Targets.${{steps.gitversion.outputs.fullSemVer}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/kevinjump/index.json --api-key ${{ github.token }}
dotnet nuget push ./build.out/uSync.Community.Contrib.${{steps.gitversion.outputs.fullSemVer}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/kevinjump/index.json --api-key ${{ github.token }}
dotnet nuget push ./build.out/uSync.Community.DataTypeSerializers.${{steps.gitversion.outputs.fullSemVer}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/kevinjump/index.json --api-key ${{ github.token }}