1
+ name : Build and Deploy Packages
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ env :
9
+ # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
10
+ BUILD_TYPE : Release
11
+
12
+ jobs :
13
+ build :
14
+ # The CMake configure and build commands are platform agnostic and should work equally
15
+ # well on Windows or Mac. You can convert this to a matrix build if you need
16
+ # cross-platform coverage.
17
+ # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
18
+ runs-on : windows-latest
19
+
20
+ steps :
21
+ # Checkout repo into build area
22
+ - uses : actions/checkout@v2
23
+ with :
24
+ fetch-depth : 0 # avoid shallow clone so nbgv can do its work.
25
+
26
+ # install nbgv please check https://github.com/dotnet/Nerdbank.GitVersioning for more info about nbgv
27
+ - uses : dotnet/nbgv@master
28
+ id : nbgv
29
+
30
+ # Build and deploy nuget package
31
+ # We include the GitHub package source so that we can reference current packages and also so that we can push to the package repo
32
+ - name : Build Project and Package
33
+ run : |
34
+ nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/mendix/index.json" -UserName srv-LibGit2sharp-mendix -Password ${{ secrets.GHPACKAGESTOKEN }}
35
+ dotnet build -c Release
36
+ nuget pack .\mx_nuget.package\Mendix_package.nuspec -Version 1.101.10 -NoPackageAnalysis
37
+ shell : powershell # Keep as powershell and not pwsh
38
+
39
+ - name : Upload build artifacts
40
+ uses : actions/upload-artifact@v2
41
+ with :
42
+ name : nuget package
43
+ path : ${{ github.workspace }}/**/*.nupkg
44
+
45
+ # After build we copy the binaries to package output folder
46
+ # Finally we pack and push the package to github packages
47
+ - name : Deploy Package
48
+ run : |
49
+ nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/mendix/index.json" -UserName srv-LibGit2sharp-mendix -Password ${{ secrets.GHPACKAGESTOKEN }}
50
+ nuget push **/Mendix.LibGit2Sharp*.nupkg -Source "GitHub" -SkipDuplicate
51
+ shell : powershell # Keep as powershell and not pwsh
52
+
0 commit comments