Skip to content

Commit 1d5b6a2

Browse files
author
A-Ovchinnikov-mx
authored
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 f958478 commit 1d5b6a2

File tree

4 files changed

+22
-59
lines changed

4 files changed

+22
-59
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: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
<AssemblyOriginatorKeyFile>..\libgit2sharp.snk</AssemblyOriginatorKeyFile>
1717
</PropertyGroup>
1818

19+
<PropertyGroup>
20+
<PackageId>Mendix.LibGit2Sharp</PackageId>
21+
</PropertyGroup>
22+
1923
<ItemGroup>
2024
<CodeAnalysisDictionary Include="CustomDictionary.xml" />
2125
<None Include="Core\Handles\Objects.tt">
@@ -29,7 +33,7 @@
2933
</ItemGroup>
3034

3135
<ItemGroup>
32-
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="[1.101.10]" PrivateAssets="none" />
36+
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="[1.110.1]" PrivateAssets="none" />
3337
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
3438
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.13" PrivateAssets="all" />
3539
</ItemGroup>
@@ -39,9 +43,8 @@
3943

4044
<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
4145
<PropertyGroup>
42-
<PackageIconUrl>https://github.com/libgit2/libgit2sharp/raw/$(GitCommitIdShort)/square-logo.png</PackageIconUrl>
43-
<PackageReleaseNotes>https://github.com/libgit2/libgit2sharp/blob/$(GitCommitIdShort)/CHANGES.md#libgit2sharp-changes</PackageReleaseNotes>
44-
<PackageLicenseUrl>https://github.com/libgit2/libgit2sharp/raw/$(GitCommitIdShort)/LICENSE.md</PackageLicenseUrl>
46+
<PackageIconUrl>https://raw.githubusercontent.com/mendix/libgit2sharp/master/square-logo.png</PackageIconUrl>
47+
<PackageLicenseUrl>https://raw.githubusercontent.com/mendix/libgit2sharp/master/LICENSE.md</PackageLicenseUrl>
4548
</PropertyGroup>
4649
</Target>
4750

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.26.2",
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)