8000 Draft: Add new exception types for different GitErrorCodes · Pull Request #22 · mendix/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content

Draft: Add new exception types for different GitErrorCodes #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add Mendix GitHub pipeline
* Use Mendix.LibGit2Sharp.NativeBinaries

Co-authored-by: Marcell van Rooyen <marcell.van.rooyen@mendix.com>
  • Loading branch information
2 people authored and Alexander committed Apr 7, 2023
commit bdd5749d7a795680aeb43da379038a3547cfbec6
42 changes: 42 additions & 0 deletions .github/workflows/Build_and_publish_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Deploy Packages

on:
pull_request:
push:
branches:
- main

jobs:
build:
# Currently we build LibGit2Sharp for Windows only
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
runs-on: windows-2019

steps:
# Checkout repo into build area
- uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so Nerdbank.GitVersioning can do its work.

# Build and deploy nuget package
# We include the GitHub package source so that we can reference current packages and also so that we can push to the package repo
- name: Build Project and Package
run: |
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name "GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }}
dotnet pack --configuration Release --output "mx_nuget" -p:PublicRelease=true LibGit2Sharp/LibGit2Sharp.csproj
shell: powershell #Keep as powershell and not pwsh

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: nuget package
path: ${{ github.workspace }}/**/*.nupkg

# After build we copy the binaries to package output folder
# Finally we pack and push the package to github packages
- name: Deploy Package
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name " 10000 ;GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }}
dotnet nuget push "**/mx_nuget/Mendix.LibGit2Sharp*.nupkg" --source "GitHub" --skip-duplicate
shell: powershell #Keep as powershell and not pwsh
98 changes: 0 additions & 98 deletions .github/workflows/ci.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .mailmap

This file was deleted.

13 changes: 5 additions & 8 deletions LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<AssemblyOriginatorKeyFile>..\libgit2sharp.snk</AssemblyOriginatorKeyFile>
<PackageIcon>square-logo.png</PackageIcon>
<PackageLicenseFile>App_Readme/LICENSE.md</PackageLicenseFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup>
<PackageId>Mendix.LibGit2Sharp</PackageId>
</PropertyGroup>

<ItemGroup>
Expand All @@ -30,18 +33,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[2.0.318]" PrivateAssets="none" />
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="[1.142.1]" PrivateAssets="none" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.220" PrivateAssets="all" />
</ItemGroup>

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

<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<PackageReleaseNotes>https://github.com/libgit2/libgit2sharp/blob/$(GitCommitIdShort)/CHANGES.md#libgit2sharp-changes</PackageReleaseNotes>
</PropertyGroup>
</Target>

</Project>
6 changes: 1 addition & 5 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "0.27.0-preview.{height}",
"publicReleaseRefSpec": [
"^refs/heads/master$", // we release out of master
"^refs/heads/maint/v\\d+(?:\\.\\d+)?$" // and maint/vNN branches
],
"version": "1.142.0",
"cloudBuild": {
"buildNumber": {
"enabled": true
Expand Down
0