-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (63 loc) · 2.4 KB
/
dotnet-core.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
name: Build, test and package
on: push
env:
MSSQL_SA_PASSWORD: "YourStrong!Passw0rd"
ACCEPT_EULA: "Y"
MSSQL_PID: "developer"
jobs:
package:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: HicServices/RDMP
ref: feature/rc4
path: RDMP
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Get version
id: version
shell: cmd
run: |
getversions >> %GITHUB_OUTPUT%
- name: Set up database
run: |
dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- install localhost TEST_ -d
- name: Test
run: |
dotnet test
- name: Build
run: |
@"
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Rdmp.HIC.Plugin</id>
<version>${{ steps.version.outputs.version }}</version>
<authors>Health Informatics Service, University of Dundee</authors>
<description>Imaging plugin for Research Data Management Platform </description>
<dependencies>
<dependency id="HIC.RDMP.Plugin" version="${{ steps.version.outputs.rdmpversion }}" />
</dependencies>
</metadata>
</package>
"@ | Out-File -Encoding ASCII plugin.nuspec
dotnet publish Plugin/windows/windows.csproj -c Release -o p/windows
dotnet publish Plugin/main/main.csproj -c Release -o p/main
cmd /c 7z a -tzip HIC.Plugin.nupkg plugin.nuspec p
dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Plugin.nupkg --dir yaml
dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- cmd listsupportedcommands --dir yaml
- name: Store created nupkg files
uses: actions/upload-artifact@v3
with:
path: ./*.nupkg
retention-days: 1
- name: Upload release binaries
if: contains(github.ref,'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: '["HIC.Rdmp.Extensions.Plugin.${{ steps.version.outputs.version }}.nupkg"]'