Skip to content

chore: Renamed project to Ion. (#19) #5

chore: Renamed project to Ion. (#19)

chore: Renamed project to Ion. (#19) #5

name: Create Release
on:
push:
branches: [ "main" ]
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
create-release:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Token Setup
if: env.GH_TOKEN == ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ env.GH_TOKEN }}
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Restore tools
run: dotnet tool restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Unit Tests
if: ${{ matrix.os != 'windows-latest' }}
run: dotnet test --configuration Release --no-build --verbosity normal --filter "Category!=E2E" --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Unit Tests & E2E Tests
if: ${{ matrix.os == 'windows-latest' }}
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage --settings coverage.runsettings
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.10
if: ${{ matrix.os == 'windows-latest' }}
with:
reports: 'coverage/**/*.cobertura.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
targetdir: 'CoverageReports' # REQUIRED # The directory where the generated report should be saved.
reporttypes: 'HtmlInline;MarkdownSummary;Cobertura' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, Html_Dark, Html_Light, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlInline_AzurePipelines_Light, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary
sourcedirs: '' # Optional directories which contain the corresponding source code (separated by semicolon). The source directories are used if coverage report contains classes without path information.
historydir: '' # Optional directory for storing persistent coverage information. Can be used in future reports to show coverage evolution.
plugins: '' # Optional plugin files for custom reports or custom history storage (separated by semicolon).
assemblyfilters: '+*' # Optional list of assemblies that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
classfilters: '+*' # Optional list of classes that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
filefilters: '+*' # Optional list of files that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
title: '' # Optional title.
tag: '${{ github.run_number }}_${{ github.run_id }}' # Optional tag or build version.
customSettings: '' # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
toolpath: 'reportgeneratortool' # Default directory for installing the dotnet tool.
- uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'windows-latest' }}
with:
name: CoverageReports
path: CoverageReports/
- name: Git Config
if: ${{ matrix.os == 'windows-latest' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Changelog
run: dotnet versionize --skip-dirty
if: ${{ matrix.os == 'windows-latest' }}
- name: Push changes
uses: ad-m/github-push-action@master
if: ${{ matrix.os == 'windows-latest' }}
with:
github_token: ${{ env.GH_TOKEN }}
force_with_lease: true