Skip to content

Commit 4da066c

Browse files
MarcellvanRooyenA-Ovchinnikov-mx
authored and
A-Ovchinnikov-mx
committed
GitHub pipeline (#1)
1 parent 1af4954 commit 4da066c

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</ItemGroup>
3131

3232
<ItemGroup>
33-
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[2.0.315-alpha.0.9]" PrivateAssets="none" />
33+
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="[1.101.10]" PrivateAssets="none" />
3434
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
3535
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.220" PrivateAssets="all" />
3636
</ItemGroup>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3+
<metadata>
4+
<id>Mendix.LibGit2Sharp</id>
5+
<version>1.0.1-mx</version>
6+
<authors>LibGit2Sharp contributors</authors>
7+
<owners>mendix</owners>
8+
<licenseUrl>https://raw.githubusercontent.com/libgit2/libgit2/master/COPYING</licenseUrl>
9+
<projectUrl>https://github.com/mendix/libgit2sharp</projectUrl>
10+
<repository url="https://github.com/mendix/libgit2sharp.git" type="git"/>
11+
<iconUrl>https://raw.githubusercontent.com/mendix/libgit2sharp/master/square-logo.png</iconUrl>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.</description>
14+
<dependencies>
15+
<dependency id="Mendix.LibGit2Sharp.NativeBinaries" version="[1.101.10]" />
16+
</dependencies>
17+
</metadata>
18+
<files>
19+
<file src="../bin/LibGit2Sharp/Release/net46/LibGit2Sharp.dll" target="lib/net46" />
20+
<file src="../bin/LibGit2Sharp/Release/net46/LibGit2Sharp.pdb" target="lib/net46" />
21+
<file src="../bin/LibGit2Sharp/Release/net46/LibGit2Sharp.xml" target="lib/net46" />
22+
23+
<file src="../bin/LibGit2Sharp/Release/netstandard2.0/LibGit2Sharp.dll" target="lib/netstandard2.0" />
24+
<file src="../bin/LibGit2Sharp/Release/netstandard2.0/LibGit2Sharp.pdb" target="lib/netstandard2.0" />
25+
<file src="../bin/LibGit2Sharp/Release/netstandard2.0/LibGit2Sharp.xml" target="lib/netstandard2.0" />
26+
27+
<file src="../LICENSE.md" target="App_Readme" />
28+
</files>
29+
</package>

0 commit comments

Comments
 (0)