Skip to content

Commit e355b71

Browse files
A-Ovchinnikov-mxA-Ovchinnikov-mx
A-Ovchinnikov-mx
authored and
A-Ovchinnikov-mx
committed
Update libgit2 to v1.1.0 (#4)
* Explicitly use windows-2019 virtual CI environment * Use LibGit2Sharp.csproj and dotnet pack instead of Mendix_package.nuspec
1 parent cdae9b2 commit e355b71

File tree

4 files changed

+20
-62
lines changed

4 files changed

+20
-62
lines changed

.github/workflows/Build_and_publish_package.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,44 @@ name: Build and Deploy Packages
33
on:
44
push:
55
branches:
6-
- master
6+
- mendix/releases
77

88
env:
99
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
10-
BUILD_TYPE: 'Release'
11-
NUPKG_VERSION: '1.101.11'
12-
10+
BUILD_TYPE: Release
11+
1312
jobs:
1413
build:
1514
# The CMake configure and build commands are platform agnostic and should work equally
1615
# well on Windows or Mac. You can convert this to a matrix build if you need
1716
# cross-platform coverage.
1817
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
19-
runs-on: windows-latest
20-
18+
runs-on: windows-2019
19+
2120
steps:
2221
# Checkout repo into build area
2322
- uses: actions/checkout@v2
2423
with:
25-
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
26-
27-
# install nbgv please check https://github.com/dotnet/Nerdbank.GitVersioning for more info about nbgv
28-
- uses: dotnet/nbgv@master
29-
id: nbgv
30-
24+
fetch-depth: 0 # avoid shallow clone so Nerdbank.GitVersioning can do its work.
25+
3126
# Build and deploy nuget package
3227
# We include the GitHub package source so that we can reference current packages and also so that we can push to the package repo
3328
- name: Build Project and Package
3429
run: |
35-
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/mendix/index.json" -UserName srv-LibGit2sharp-mendix -Password ${{ secrets.GHPACKAGESTOKEN }}
36-
dotnet build -c Release
37-
nuget pack .\mx_nuget.package\Mendix_package.nuspec -Version ${{ env.NUPKG_VERSION }} -NoPackageAnalysis
30+
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name "GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }}
31+
dotnet pack --configuration Release --output "mx_nuget" -p:PublicRelease=true LibGit2Sharp/LibGit2Sharp.csproj
3832
shell: powershell #Keep as powershell and not pwsh
39-
33+
4034
- name: Upload build artifacts
4135
uses: actions/upload-artifact@v2
4236
with:
4337
name: nuget package
44-
path: ${{ github.workspace }}/**/*.nupkg
38+
path: ${{ github.workspace }}/**/*.nupkg
4539

4640
# After build we copy the binaries to package output folder
47-
# Finally we pack and push the package to github packages
41+
# Finally we pack and push the package to github packages
4842
- name: Deploy Package
4943
run: |
50-
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/mendix/index.json" -UserName srv-LibGit2sharp-mendix -Password ${{ secrets.GHPACKAGESTOKEN }}
51-
nuget push **/Mendix.LibGit2Sharp*.nupkg -Source "GitHub" -SkipDuplicate
44+
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name "GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }}
45+
dotnet nuget push "**/mx_nuget/Mendix.LibGit2Sharp*.nupkg" --source "GitHub" --skip-duplicate
5246
shell: powershell #Keep as powershell and not pwsh
53-

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2020
</PropertyGroup>
2121

22+
<PropertyGroup>
23+
<PackageId>Mendix.LibGit2Sharp</PackageId>
24+
</PropertyGroup>
25+
2226
<ItemGroup>
2327
<None Include="..\square-logo.png" Pack="true" PackagePath="" Visible="false" />
2428
<None Include="..\README.md" Pack="true" PackagePath="App_Readme/" Visible="false" />
@@ -30,18 +34,12 @@
3034
</ItemGroup>
3135

3236
<ItemGroup>
33-
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="[1.101.10]" PrivateAssets="none" />
37+
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="[1.110.1]" PrivateAssets="none" />
3438
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
3539
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.220" PrivateAssets="all" />
3640
</ItemGroup>
3741

3842
<Import Project="..\Targets\CodeGenerator.targets" />
3943
<Import Project="..\Targets\GenerateNativeDllName.targets" />
4044

41-
<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
42-
<PropertyGroup>
43-
<PackageReleaseNotes>https://github.com/libgit2/libgit2sharp/blob/$(GitCommitIdShort)/CHANGES.md#libgit2sharp-changes</PackageReleaseNotes>
44-
</PropertyGroup>
45-
</Target>
46-
4745
</Project>

mx_nuget.package/Mendix_package.nuspec

Lines changed: 0 additions & 29 deletions
This file was deleted.

version.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "0.27.0-preview.{height}",
4-
"publicReleaseRefSpec": [
5-
"^refs/heads/master$", // we release out of master
6-
"^refs/heads/maint/v\\d+(?:\\.\\d+)?$" // and maint/vNN branches
7-
],
3+
"version": "1.110.1",
84
"cloudBuild": {
95
"buildNumber": {
106
"enabled": true

0 commit comments

Comments
 (0)