-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
100 changed files
with
3,447 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md | ||
!**/.gitignore | ||
!.git/HEAD | ||
!.git/config | ||
!.git/packed-refs | ||
!.git/refs/heads/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build | ||
description: 'Build steps' | ||
inputs: | ||
useVersioning: | ||
description: 'Apply versioning to the build' | ||
required: true | ||
default: 'false' | ||
configuration: | ||
description: 'Build configuration' | ||
required: true | ||
default: 'Debug' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
|
||
|
||
- name: tools - dotnet - install | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.x' | ||
|
||
- name: tools - gitversion - install | ||
if: ${{ inputs.useVersioning == 'true' }} | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
preferLatestVersion: true | ||
|
||
- name: tools - gitversion - execute | ||
if: ${{ inputs.useVersioning == 'true' }} | ||
uses: gittools/actions/gitversion/[email protected] | ||
# with: | ||
# useConfigFile: true | ||
# configFilePath: GitVersion.yaml | ||
|
||
- name: cache - nuget | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.nuget/packages | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | ||
restore-keys: | | ||
${{ runner.os }}-nuget- | ||
- name: dotnet restore | ||
shell: bash | ||
run: dotnet restore | ||
|
||
|
||
- name: dotnet build | ||
if: ${{ inputs.useVersioning != 'true' }} | ||
shell: bash | ||
run: dotnet build --no-restore --configuration ${{ inputs.configuration }} | ||
|
||
- name: dotnet build | ||
if: ${{ inputs.useVersioning == 'true' }} | ||
shell: bash | ||
run: dotnet build --no-restore --configuration ${{ inputs.configuration }} /p:Version=${{env.GitVersion_SemVer}} /p:AssemblyVersion=${{env.GitVersion_AssemblySemFileVer}} /p:NuGetVersion=${{env.GitVersion_SemVer}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Test | ||
description: 'Test steps' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: dotnet test | ||
shell: bash | ||
run: dotnet test --no-build --verbosity normal | ||
|
||
- name: test-reporter | ||
uses: dorny/test-reporter@v1 | ||
if: always() | ||
with: | ||
name: Test Results | ||
path: .artifacts/TestResults/*.trx | ||
reporter: dotnet-trx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' # Matches all branches | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: build | ||
uses: ./.github/actions/build | ||
with: | ||
configuration: Debug | ||
useVersioning: false | ||
|
||
- name: test | ||
uses: ./.github/actions/test | ||
|
||
cd: | ||
name: CD | ||
needs: ci | ||
runs-on: ubuntu-latest | ||
if: > | ||
github.ref == 'refs/heads/main' || | ||
github.ref == 'refs/heads/develop' || | ||
startsWith(github.ref, 'refs/heads/feature/') || | ||
startsWith(github.ref, 'refs/heads/release/') || | ||
startsWith(github.ref, 'refs/heads/hotfix/') | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: build | ||
uses: ./.github/actions/build | ||
with: | ||
configuration: Release | ||
useVersioning: true | ||
|
||
- name: artifacts - nuget - gather | ||
run: | | ||
mkdir -p .artifacts/nuget | ||
find . -name "*.nupkg" -exec cp {} .artifacts/nuget/ \; | ||
- name: artifacts - nuget - upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifacts-nuget | ||
path: .artifacts/nuget/*.nupkg | ||
|
||
- name: git - tag | ||
if: > | ||
github.ref == 'refs/heads/main' || | ||
startsWith(github.ref, 'refs/heads/release/') || | ||
startsWith(github.ref, 'refs/heads/hotfix/') | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
git tag ${{env.GitVersion_SemVer}} | ||
git push origin ${{env.GitVersion_SemVer}} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
ci: | ||
name: CI - Build and Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: build | ||
uses: ./.github/actions/build | ||
with: | ||
configuration: Debug | ||
useVersioning: false | ||
|
||
- name: test | ||
uses: ./.github/actions/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<!--Generate debug symbols and embed them in the build output.--> | ||
<DebugType>embedded</DebugType> | ||
<DebugSymbols>true</DebugSymbols> | ||
<!--Set the solution directory to the parent directory of the build file.--> | ||
<SolutionDir Condition="'$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)..\</SolutionDir> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<PackageOutputDir>$(SolutionDir).artifacts/nuget</PackageOutputDir> | ||
<Authors>emberstack</Authors> | ||
<Company>EmberStack</Company> | ||
<RepositoryUrl>https://github.com/emberstack/ES.FX</RepositoryUrl> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<!--<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>--> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<NoWarn>$(NoWarn);NU5104</NoWarn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<!-- Default to false; specific projects will override to true --> | ||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(MSBuildProjectName)' == '' Or $(MSBuildProjectName.StartsWith('ES.FX'))"> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
</PropertyGroup> | ||
|
||
<!--Test projects--> | ||
<ItemGroup Condition="'$(MSBuildProjectName)' == '' Or $(MSBuildProjectName.EndsWith('.Tests'))"> | ||
<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" /> | ||
</ItemGroup> | ||
<PropertyGroup Condition="'$(MSBuildProjectName)' == '' Or $(MSBuildProjectName.EndsWith('.Tests'))"> | ||
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger> | ||
<VSTestResultsDirectory>$(MSBuildThisFileDirectory)/.artifacts/TestResults</VSTestResultsDirectory> | ||
</PropertyGroup> | ||
</Project> | ||
|
Oops, something went wrong.