Skip to content

Commit 986ba9f

Browse files
MarcellvanRooyenA-Ovchinnikov-mx
authored and
A-Ovchinnikov-mx
committed
Add Mendix GitHub pipeline
Co-authored-by: Marcell van Rooyen <[email protected]>
1 parent 1af4954 commit 986ba9f

File tree

3 files changed

+48
-12
lines changed

3 files changed

+48
-12
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and Deploy Packages
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
# Currently we build LibGit2Sharp for Windows only
12+
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
13+
runs-on: windows-2019
14+
15+
steps:
16+
# Checkout repo into build area
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0 # avoid shallow clone so Nerdbank.GitVersioning can do its work.
20+
21+
# Build and deploy nuget package
22+
# We include the GitHub package source so that we can reference current packages and also so that we can push to the package repo
23+
- name: Build Project and Package
24+
run: |
25+
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name "GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }}
26+
dotnet pack --configuration Release --output "mx_nuget" -p:PublicRelease=true LibGit2Sharp/LibGit2Sharp.csproj
27+
shell: powershell #Keep as powershell and not pwsh
28+
29+
- name: Upload build artifacts
30+
uses: actions/upload-artifact@v2
31+
with:
32+
name: nuget package
33+
path: ${{ github.workspace }}/**/*.nupkg
34+
35+
# After build we copy the binaries to package output folder
36+
# Finally we pack and push the package to github packages
37+
- name: Deploy Package
38+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
39+
run: |
40+
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name "GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }}
41+
dotnet nuget push "**/mx_nuget/Mendix.LibGit2Sharp*.nupkg" --source "GitHub" --skip-duplicate
42+
shell: powershell #Keep as powershell and not pwsh

LibGit2Sharp/LibGit2Sharp.csproj

+5-7
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="LibGit2Sharp.NativeBinaries" Version="[2.0.315-alpha.0.9]" 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>

version.json

+1-5
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)