Skip to content

Commit

Permalink
Merge branch '2.X'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jul 8, 2022
2 parents 2e65df9 + 40be839 commit d935919
Show file tree
Hide file tree
Showing 102 changed files with 3,683 additions and 1,452 deletions.
128 changes: 128 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: Build and Publish

on:
push:
branches: [ master, 2.X ]
tags:
- '*'
pull_request:
branches: [ master, 2.X ]
workflow_dispatch:

env:
CHANGELOG_PATH: ./Changelog.md
CODE_COVERAGE_PATH: ./Coverage.xml
SOLUTION_PATH: ./Source/Reloaded.Messaging.sln
NUPKG_GLOB: ./Source/**/*.nupkg
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }}
RELEASE_TAG: ${{ github.ref_name }}

jobs:
build:
runs-on: windows-2022
defaults:
run:
shell: pwsh

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup .NET Core SDK (3.1.x)
uses: actions/[email protected]
with:
# Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x
dotnet-version: 3.1.x

- name: Setup .NET Core SDK (5.0.x)
uses: actions/[email protected]
with:
# Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x
dotnet-version: 5.0.x

- name: Setup .NET Core SDK (6.0.x)
uses: actions/[email protected]
with:
# Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x
dotnet-version: 6.0.x

# Required for C#10 features.
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Setup AutoChangelog
run: npm install -g auto-changelog

- name: Get Dotnet Info
run: dotnet --info

- name: Build
run: dotnet build -c Release "$env:SOLUTION_PATH"

- name: Test
run: |
dotnet test ./Source/Reloaded.Messaging.Tests/Reloaded.Messaging.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="../../$env:CODE_COVERAGE_PATH" --% /p:Exclude=\"[xunit.*]*\"
- name: Codecov
# You may pin to the exact commit or the version.
# uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b
uses: codecov/[email protected]
with:
# Comma-separated list of files to upload
files: ${{ env.CODE_COVERAGE_PATH }}

- name: Create Changelog (on Tag)
run: |
if ($env:IS_RELEASE -eq 'true')
{
auto-changelog --sort-commits date --hide-credit --template keepachangelog --commit-limit false --unreleased --starting-version "$env:RELEASE_TAG" --output "$env:CHANGELOG_PATH"
}
else
{
auto-changelog --sort-commits date --hide-credit --template keepachangelog --commit-limit false --unreleased --output "$env:CHANGELOG_PATH"
}
- name: Upload NuGet Package Artifact
uses: actions/[email protected]
with:
# Artifact name
name: NuGet Packages
# A file, directory or wildcard pattern that describes what to upload
path: |
${{ env.NUPKG_GLOB }}
- name: Upload Changelog Artifact
uses: actions/[email protected]
with:
# Artifact name
name: Changelog
# A file, directory or wildcard pattern that describes what to upload
path: ${{ env.CHANGELOG_PATH }}
retention-days: 0


- name: Upload to GitHub Releases
uses: softprops/[email protected]
if: env.IS_RELEASE == 'true'
with:
# Path to load note-worthy description of changes in release from
body_path: ${{ env.CHANGELOG_PATH }}
# Newline-delimited list of path globs for asset files to upload
files: |
${{ env.NUPKG_GLOB }}
${{ env.CHANGELOG_PATH }}
- name: Upload to NuGet (on Tag)
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
if: env.IS_RELEASE == 'true'
run: |
$items = Get-ChildItem -Path "$env:NUPKG_GLOB" -Recurse
Foreach ($item in $items)
{
Write-Host "Pushing $item"
dotnet nuget push "$item" -k "$env:NUGET_KEY" -s "https://api.nuget.org/v3/index.json" --skip-duplicate
}
32 changes: 32 additions & 0 deletions .github/workflows/deploy-mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: DeployMkDocs

# Controls when the action will run.
on:
# Triggers the workflow on push on the master branch
push:
branches: [ master, 2.X ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Branch
uses: actions/checkout@v2

# Deploy MkDocs
- name: Deploy MkDocs
# You may pin to the exact commit or the version.
# uses: mhausenblas/mkdocs-deploy-gh-pages@66340182cb2a1a63f8a3783e3e2146b7d151a0bb
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81 changes: 0 additions & 81 deletions Docs/ImplementingCompressorsSerializers.md

This file was deleted.

136 changes: 0 additions & 136 deletions Docs/UseAsNetworkingLibrary.md

This file was deleted.

Loading

0 comments on commit d935919

Please sign in to comment.