Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 15 additions & 5 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ queue_rules:
- -closed # filter-out closed GH PRs
- base=main
- label=automerge
- check-success=build
- check-success=build (windows-latest)
- check-success=build (ubuntu-latest)
- check-success=build (macos-latest)
- check-success=Codacy Static Code Analysis
- check-success=DCO
- check-success=WIP
Expand All @@ -15,7 +17,9 @@ pull_request_rules:
# for check failures / WIP pending check.
- name: Add enhancement label
conditions:
- check-pending=build
- check-pending=build (windows-latest)
- check-pending=build (ubuntu-latest)
- check-pending=build (macos-latest)
- -closed
- -label=enhancement
actions:
Expand All @@ -25,7 +29,9 @@ pull_request_rules:

- name: Add automerge label
conditions:
- check-success=build
- check-success=build (windows-latest)
- check-success=build (ubuntu-latest)
- check-success=build (macos-latest)
- -draft
- -closed
- -conflict
Expand All @@ -38,7 +44,9 @@ pull_request_rules:

- name: Automatic message on build failure
conditions:
- check-failure=build
- check-failure=build (windows-latest)
- check-failure=build (ubuntu-latest)
- check-failure=build (macos-latest)
- -draft
- -closed
actions:
Expand Down Expand Up @@ -93,7 +101,9 @@ pull_request_rules:
- -closed # filter-out closed GH PRs
- base=main
- label=automerge
- check-success=build
- check-success=build (windows-latest)
- check-success=build (ubuntu-latest)
- check-success=build (macos-latest)
- check-success=Codacy Static Code Analysis
- check-success=DCO
- check-success=WIP
Expand Down
57 changes: 54 additions & 3 deletions .github/workflows/dotnetcore-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
BUILD_RERUN_COUNT: ${{ github.run_attempt }}
steps:
- uses: actions/checkout@main
Expand All @@ -27,4 +30,52 @@ jobs:
with:
RESTORE: false
PACK: true
PUSH: true
PUSH: false

- name: Clean up temp installer files.
run: |
del artifacts/packages/Release/Shipping/*.wixpdb
del artifacts/packages/Release/Shipping/*-runtime-*.*
del artifacts/packages/Release/Shipping/*-targeting-pack-*.*
shell: pwsh

- name: Upload artifacts
uses: actions/upload-artifact@main
with:
name: Shipping
path: artifacts/packages/Release/Shipping/*

- name: Upload binlog on failure.
uses: actions/upload-artifact@main
if: ${{ failure() }}
with:
name: msbuild.binlog
path: msbuild.binlog

create_release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@main
with:
name: Shipping
path: artifacts/packages/Release/Shipping/

- name: Push nuget Packages to nuget.org.
run: dotnet nuget push **/*.nupkg -s nuget.org -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate

- name: Extract version from version.txt.
id: read_file
uses: andstor/file-reader-action@master
with:
path: "artifacts/packages/Release/Shipping/version.txt"

- uses: ncipollo/release-action@main
with:
artifacts: "artifacts/packages/Release/Shipping/*.exe,artifacts/packages/Release/Shipping/*.*pkg,artifacts/packages/Release/Shipping/*.zip,artifacts/packages/Release/Shipping/*.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
tag: ${ steps.read_file.outputs.contents }
54 changes: 48 additions & 6 deletions .github/workflows/dotnetcore-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ on:
# only run when stable release tags are made, when prerelease or rc tags are made ignore them.
tags:
- '*'
tags-ignore:
- '*-preview.*'
- '*-rc.*'
- '!*-preview.*'
- '!*-rc.*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
BUILD_RERUN_COUNT: ${{ github.run_attempt }}
steps:
- uses: actions/checkout@main
Expand All @@ -32,4 +34,44 @@ jobs:
with:
RESTORE: false
PACK: true
PUSH: true
PUSH: false

- name: Clean up temp installer files.
run: |
del artifacts/packages/Release/Shipping/*.wixpdb
del artifacts/packages/Release/Shipping/*-runtime-*.*
del artifacts/packages/Release/Shipping/*-targeting-pack-*.*
shell: pwsh

- name: Upload artifacts
uses: actions/upload-artifact@main
with:
name: Shipping
path: artifacts/packages/Release/Shipping/*

- name: Upload binlog on failure.
uses: actions/upload-artifact@main
if: ${{ failure() }}
with:
name: msbuild.binlog
path: msbuild.binlog

create_release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@main
with:
name: Shipping
path: artifacts/packages/Release/Shipping/

- name: Push nuget Packages to nuget.org.
run: dotnet nuget push **/*.nupkg -s nuget.org -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate

- uses: ncipollo/release-action@main
with:
artifacts: "artifacts/packages/Release/Shipping/*.exe,artifacts/packages/Release/Shipping/*.*pkg,artifacts/packages/Release/Shipping/*.zip,artifacts/packages/Release/Shipping/*.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}
26 changes: 25 additions & 1 deletion .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
Expand All @@ -23,3 +27,23 @@ jobs:
uses: Elskom/build-dotnet@main
with:
RESTORE: false

- name: Clean up temp installer files.
run: |
del artifacts/packages/Release/Shipping/*.wixpdb
del artifacts/packages/Release/Shipping/*-runtime-*.*
del artifacts/packages/Release/Shipping/*-targeting-pack-*.*
shell: pwsh

- name: Upload artifacts
uses: actions/upload-artifact@main
with:
name: Shipping
path: artifacts/packages/Release/Shipping/*

- name: Upload binlog on failure.
uses: actions/upload-artifact@main
if: ${{ failure() }}
with:
name: msbuild.binlog
path: msbuild.binlog
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj
XmlAbstraction/
*.binlog
GitInfo.json
website/

# opening Finder on mac inside the repository creates these.
.DS_Store
Expand Down
71 changes: 60 additions & 11 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!-- We need to mark the sfxproj files as packaging projects to avoid changing their output directories. -->
<IsPackageProject Condition="'$(MSBuildProjectExtension)' == '.sfxproj'">true</IsPackageProject>
<IsPackageProject Condition="'$(MSBuildProjectExtension)' != '.sfxproj'">false</IsPackageProject>
<IsPackageProject Condition="'$(MSBuildProjectExtension)' == '.sfxproj' OR '$(MSBuildProjectExtension)' == '.bundleproj' OR '$(MSBuildProjectName)' == 'installers.csproj'">true</IsPackageProject>
<IsPackageProject Condition="'$(MSBuildProjectExtension)' != '.sfxproj' AND '$(MSBuildProjectExtension)' != '.bundleproj'">false</IsPackageProject>
<RepoRoot Condition="'$(IsPackageProject)' == 'true'">$(MSBuildThisFileDirectory)</RepoRoot>
<!-- Mark the nuget packages as serviceable. -->
<Serviceable>true</Serviceable>
<!-- suppress message when using the .NET Preview SDKs. -->
Expand All @@ -17,18 +19,17 @@
fix that is to disable package analysis for now.
-->
<NoPackageAnalysis Condition="'$(PublishReferenceAssemblies)' == 'true'">true</NoPackageAnalysis>
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts\</PackageOutputPath>
<Company>Els_kom org.</Company>
<Authors>Els_kom org.</Authors>
<ElskomOrgName>Els_kom org.</ElskomOrgName>
<Company>$(ElskomOrgName)</Company>
<Authors>$(ElskomOrgName)</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Elskom/runtime/</PackageProjectUrl>
<RepositoryUrl>https://github.com/Elskom/runtime/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Copyright>Copyright (c) 2018-2021</Copyright>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<CopyrightElskom>Copyright (c) 2018-2021</CopyrightElskom>
<Copyright Condition="'$(IsPackageProject)' == 'false'">$(CopyrightElskom)</Copyright>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true' AND '$(IsPackageProject)' == 'false'">true</ContinuousIntegrationBuild>
<IsTagBuild Condition="$(GITHUB_REF.StartsWith('refs/tags/'))">true</IsTagBuild>
<VersionSuffix Condition="'$(IsTagBuild)' == '' AND '$(GITHUB_ACTIONS)' == ''">-dev</VersionSuffix>
<VersionSuffix Condition="'$(IsTagBuild)' == '' AND '$(GITHUB_ACTIONS)' == 'true'">-preview.$(GITHUB_RUN_NUMBER).$(BUILD_RERUN_COUNT)</VersionSuffix>
<RootNamespace Condition="'$(RootNamespace)' == ''">Elskom.Generic.Libs</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Elskom.snk</AssemblyOriginatorKeyFile>
Expand All @@ -46,8 +47,56 @@
<IntermediateOutputPath Condition="'$(IsPackageProject)' == 'true'">$(MSBuildThisFileDirectory)obj\pkg\$(MSBuildProjectName)\$(Configuration)\</IntermediateOutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' == ''">$(MSBuildThisFileDirectory)bin\$(Configuration)\runtime\</OutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' != ''">$(MSBuildThisFileDirectory)bin\$(Configuration)\ref\</OutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'true' AND !$(MSBuildProjectName.EndsWith('.Ref'))">$(MSBuildThisFileDirectory)bin\$(Configuration)\pkg\runtime\</OutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'true' AND $(MSBuildProjectName.EndsWith('.Ref'))">$(MSBuildThisFileDirectory)bin\$(Configuration)\pkg\ref\</OutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'true' AND !$(MSBuildProjectName.Contains('.Ref'))">$(MSBuildThisFileDirectory)bin\$(Configuration)\pkg\runtime\</OutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'true' AND $(MSBuildProjectName.Contains('.Ref'))">$(MSBuildThisFileDirectory)bin\$(Configuration)\pkg\ref\</OutputPath>
<_TargetFrameworkVersionWithoutV Condition="'$(IsPackageProject)' == 'true'">6.0</_TargetFrameworkVersionWithoutV>
<WriteWebsiteArtifactFilesAfterTargets>GenerateBundles</WriteWebsiteArtifactFilesAfterTargets>
<WriteWebsiteArtifactFilesAfterTargets Condition="$([MSBuild]::IsOSPlatform('Linux'))">_CreateArchive;_CreateSymbolsArchive</WriteWebsiteArtifactFilesAfterTargets>
</PropertyGroup>

<Target Name="WriteWebsiteArtifactFiles" AfterTargets="$(WriteWebsiteArtifactFilesAfterTargets)" Condition="'$(GITHUB_ACTIONS)' == 'true' AND '$(IsPackageProject)' == 'true'">
<WriteLinesToFile
File="$(MSBuildThisFileDirectory)website\runtime\version.txt"
Lines="$(Version)"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
<ItemGroup>
<FilesToDelete
Include="$(MSBuildThisFileDirectory)website\runtime\packages\$(ArchiveName)-*-$(RuntimeIdentifier).tar.gz"
Condition="$(RuntimeIdentifier.StartsWith('linux-')) AND $([MSBuild]::IsOSPlatform('Linux')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToDelete
Include="$(MSBuildThisFileDirectory)website\runtime\packages\$(InstallerName)-*-$(RuntimeIdentifier).pkg"
Condtion="$(RuntimeIdentifier.StartsWith('osx-')) AND $([MSBuild]::IsOSPlatform('OSX')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToDelete
Include="$(MSBuildThisFileDirectory)website\runtime\packages\$(InstallerName)-*-$(RuntimeIdentifier).exe"
Condition="$(RuntimeIdentifier.StartsWith('win-')) AND $([MSBuild]::IsOSPlatform('Windows')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToCopy
Include="$(MSBuildThisFileDirectory)artifacts\packages\Release\Shipping\$(ArchiveName)-$(Version)-$(RuntimeIdentifier).tar.gz"
Condition="$(RuntimeIdentifier.StartsWith('linux-')) AND $([MSBuild]::IsOSPlatform('Linux')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToCopy
Include="$(MSBuildThisFileDirectory)artifacts\packages\Release\Shipping\$(InstallerName)-$(Version)-$(RuntimeIdentifier).pkg"
Condition="$(RuntimeIdentifier.StartsWith('osx-')) AND $([MSBuild]::IsOSPlatform('OSX')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToCopy
Include="$(MSBuildThisFileDirectory)artifacts\packages\Release\Shipping\$(InstallerName)-$(Version)-$(RuntimeIdentifier).exe"
Condition="$(RuntimeIdentifier.StartsWith('win-')) AND $([MSBuild]::IsOSPlatform('Windows')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
<Copy
SourceFiles="@(FilesToCopy)"
DestinationFolder="$(MSBuildThisFileDirectory)website\runtime\packages\"
OverwriteReadOnlyFiles="true" />
<Message
Importance="high"
Text="$(ArchiveName)-$(Version)-$(RuntimeIdentifier).tar.gz -> $(MSBuildThisFileDirectory)website\runtime\packages\$(ArchiveName)-$(Version)-$(RuntimeIdentifier).tar.gz"
Condition="$(RuntimeIdentifier.StartsWith('linux-')) AND $([MSBuild]::IsOSPlatform('Linux')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<Message
Importance="high"
Text="$(InstallerName)-$(Version)-$(RuntimeIdentifier).pkg -> $(MSBuildThisFileDirectory)website\runtime\packages\$(InstallerName)-$(Version)-$(RuntimeIdentifier).pkg"
Condition="$(RuntimeIdentifier.StartsWith('osx-')) AND $([MSBuild]::IsOSPlatform('OSX')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<Message
Importance="high"
Text="$(InstallerName)-$(Version)-$(RuntimeIdentifier).exe -> $(MSBuildThisFileDirectory)website\runtime\packages\$(InstallerName)-$(Version)-$(RuntimeIdentifier).exe"
Condition="$(RuntimeIdentifier.StartsWith('win-')) AND $([MSBuild]::IsOSPlatform('Windows')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
</Target>

</Project>
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageVersion Include="Microsoft.Diagnostics.NetCore.Client" Version="0.2.328102" />
<PackageVersion Include="IDisposableGenerator" Version="1.1.0" />
<PackageVersion Include="Microsoft.DotNet.Build.Tasks.Installers" Version="7.0.0-beta.22322.3" />
<PackageVersion Include="Microsoft.DotNet.Build.Tasks.Archives" Version="7.0.0-beta.22322.3" />
</ItemGroup>

</Project>
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
MIT License
The MIT License (MIT)

Copyright (c) 2018-2022 Els_kom

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 3 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
<add key="xunit-prereleases" value="https://www.myget.org/F/xunit/api/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<!-- Required to restore the projects for now. -->
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
</packageSources>
</configuration>
Binary file added els_kom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>

<PropertyGroup>
<!-- This repo version -->
<MajorVersion>6</MajorVersion>
<MinorVersion>0</MinorVersion>
<PatchVersion>0</PatchVersion>
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<DotNetFinalVersionKind Condition="$(GITHUB_REF.StartsWith('refs/tags/'))">release</DotNetFinalVersionKind>
<PreReleaseVersionLabel Condition="'$(GITHUB_ACTIONS)' == 'true'">preview</PreReleaseVersionLabel>
<PreReleaseVersionIteration Condition="'$(GITHUB_ACTIONS)' == 'true' AND '$(DotNetFinalVersionKind)' != 'release'">$(GITHUB_RUN_NUMBER)</PreReleaseVersionIteration>
<OfficialBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</OfficialBuild>
<ProductVersion>$(VersionPrefix)-$(VersionSuffix)</ProductVersion>
</PropertyGroup>

</Project>
5 changes: 4 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"Elskom.Sdk": "6.0.1"
"Elskom.Sdk": "6.0.1",
"Microsoft.Build.NoTargets": "3.5.6",
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22317.1",
"Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.22317.1"
}
}
Loading