-
Notifications
You must be signed in to change notification settings - Fork 66
127 lines (95 loc) · 4.36 KB
/
package-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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Build and Package.
on:
push:
branches: [v15/main]
env:
config: Release
out_folder: ./build-out/
jobs:
version:
runs-on: windows-latest
outputs:
version_string: ${{ steps.gitversion.outputs.fullSemVer }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3
with:
versionSpec: "5.x"
- name: Determine Version with GitVersion (MSBuild in Proj will do this)
id: gitversion
uses: gittools/actions/gitversion/execute@v3
with:
useConfigFile: true
configFilePath: ./GitVersion.yml
- name: Display version
run: |
echo "Full Version: ${{ steps.gitversion.outputs.fullSemVer }}"
build-project:
runs-on: windows-latest
needs: version
env:
solution_name: ./uSync.sln
test_project: ./uSync.Tests/uSync.tests.csproj
schema_gen_project: ./uSync.SchemaGenerator/uSync.SchemaGenerator.csproj
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: restore
run: dotnet restore ${{ env.solution_name}} --locked-mode
- name: build
run: dotnet build ${{ env.solution_name }} -c ${{ env.config }} -p:ContinuousIntegrationBuild=true
- name: test
run: dotnet test ${{ env.solution_name }}
- name: Generate AppSettings Schema
run: dotnet run -c ${{env.Config}} --project ${{ env.schema_gen_project}}
package-up:
runs-on: windows-latest
needs: [build-project, version]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: version
run: |
echo "Version: ${{ needs.version.outputs.version_string}}"
- name: Stamp version on NPM Package
working-directory: ./uSync.Backoffice.Management.Client/usync-assets
run: npm version ${{ needs.version.outputs.version_string }}
- name: npm install
working-directory: ./uSync.Backoffice.Management.Client/usync-assets
run: npm ci
- name: npm build
working-directory: ./uSync.Backoffice.Management.Client/usync-assets
run: npm run build
- name: restore
run: dotnet restore ${{ env.solution_name}} --locked-mode
- name: package uSync.Core
run: dotnet pack ./uSync.Core/uSync.Core.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Backoffice
run: dotnet pack ./uSync.Backoffice/uSync.Backoffice.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Backoffice.Management.Api
run: dotnet pack ./uSync.Backoffice.Management.Api/uSync.Backoffice.Management.Api.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Backoffice.Management.Client
run: dotnet pack ./uSync.Backoffice.Management.Client/uSync.Backoffice.Management.Client.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Backoffice.Targets
run: dotnet pack ./uSync.Backoffice.Targets/uSync.Backoffice.Targets.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Community.Contrib
run: dotnet pack ./uSync.Community.Contrib/uSync.Community.Contrib.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Community.DataTypeSerializers
run: dotnet pack ./uSync.Community.DataTypeSerializers/uSync.Community.DataTypeSerializers.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: Upload nuget file as build artifact
uses: actions/upload-artifact@v4
with:
name: Nuget Build Output
path: ${{env.OUT_FOLDER}}