Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
olduh29 committed Sep 5, 2022
1 parent 6ecfa72 commit 318a36d
Showing 1 changed file with 86 additions and 86 deletions.
172 changes: 86 additions & 86 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
name: .NET Core

on:
workflow_dispatch:
push:
branches:
- dev
- master
pull_request:
branches:
- dev
jobs:
build:
env:
TESTS_PROJECT: 'CoreLispTests/CoreLispTests.csproj'
PUBLISH_NUGET: true
RUN_TESTS: true
MAIN_CSPROJ: 'CoreLisp/CoreLisp.csproj'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Clean artifacts and nugets
run: dotnet clean --configuration Release && dotnet nuget locals all --clear
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Test with dotnet
uses: b3b00/coverlet-action@1.2.2
id: 'coverlet'
if: env.RUN_TESTS
with:
testProject: ${{env.TESTS_PROJECT}}
output: 'lcov.info'
outputFormat: 'lcov'
excludes: '[program]*'
- name: coveralls
uses: coverallsapp/github-action@v1.1.2
if: matrix.os == 'windows-latest' && env.RUN_TESTS
with:
github-token: ${{secrets.GITHUB_TOKEN }}
path-to-lcov: ${{steps.coverlet.outputs.coverageFile}}
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@4.8.4
with:
reports: ${{steps.coverlet.outputs.coverageFile}}
targetdir: 'coveragereport'
reporttypes: 'HtmlInline;lcov'
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
tag: '${{ github.run_number }}_${{ github.run_id }}'
- name: publish nuget
if: matrix.os == 'windows-latest' && env.PUBLISH_NUGET
id: publish_nuget
uses: brandedoutcast/publish-nuget@v2.5.2
with:
VERSION_REGEX: <version>(.*)<\/version>
PROJECT_FILE_PATH: ${{env.MAIN_CSPROJ}}
NUGET_KEY: ${{secrets.NUGET_KEY}}
VERSION_FILE_PATH: ${{env.MAIN_CSPROJ}}
- name: Create Release
if: ${{ success() && matrix.os == 'ubuntu-latest' && steps.publish_nuget.outputs.VERSION != '' && steps.publish_nuget.outputs.VERSION != null }}
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.publish_nuget.outputs.VERSION }}
release_name: Release ${{ steps.publish_nuget.outputs.VERSION }}
draft: false
prerelease: false
- name: Upload Release Asset
if: ${{ success() && matrix.os == 'ubuntu-latest' && steps.create_release.outputs.upload_url != '' && steps.create_release.outputs.upload_url != null }}
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.publish_nuget.outputs.PACKAGE_PATH }}
asset_name: ${{ steps.publish_nuget.outputs.PACKAGE_NAME }}
asset_content_type: application/zip
name: .NET Core

on:
workflow_dispatch:
push:
branches:
- dev
- master
pull_request:
branches:
- dev
jobs:
build:
env:
TESTS_PROJECT: 'CoreLispTests/CoreLispTests.csproj'
PUBLISH_NUGET: true
RUN_TESTS: true
MAIN_CSPROJ: 'CoreLisp/CoreLisp.csproj'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Clean artifacts and nugets
run: dotnet clean --configuration Release && dotnet nuget locals all --clear
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Test with dotnet
uses: b3b00/coverlet-action@1.2.2
id: 'coverlet'
if: env.RUN_TESTS
with:
testProject: ${{env.TESTS_PROJECT}}
output: 'lcov.info'
outputFormat: 'lcov'
excludes: '[program]*'
- name: coveralls
uses: coverallsapp/github-action@v1.1.2
if: matrix.os == 'windows-latest' && env.RUN_TESTS
with:
github-token: ${{secrets.GITHUB_TOKEN }}
path-to-lcov: ${{steps.coverlet.outputs.coverageFile}}
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@4.8.4
with:
reports: ${{steps.coverlet.outputs.coverageFile}}
targetdir: 'coveragereport'
reporttypes: 'HtmlInline;lcov'
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
tag: '${{ github.run_number }}_${{ github.run_id }}'
- name: publish nuget
if: matrix.os == 'windows-latest' && env.PUBLISH_NUGET
id: publish_nuget
uses: brandedoutcast/publish-nuget@v2.5.2
with:
VERSION_REGEX: <version>(.*)<\/version>
PROJECT_FILE_PATH: ${{env.MAIN_CSPROJ}}
NUGET_KEY: ${{secrets.NUGET_KEY}}
VERSION_FILE_PATH: ${{env.MAIN_CSPROJ}}
- name: Create Release
if: ${{ success() && matrix.os == 'ubuntu-latest' && steps.publish_nuget.outputs.VERSION != '' && steps.publish_nuget.outputs.VERSION != null }}
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.publish_nuget.outputs.VERSION }}
release_name: Release ${{ steps.publish_nuget.outputs.VERSION }}
draft: false
prerelease: false
- name: Upload Release Asset
if: ${{ success() && matrix.os == 'ubuntu-latest' && steps.create_release.outputs.upload_url != '' && steps.create_release.outputs.upload_url != null }}
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.publish_nuget.outputs.PACKAGE_PATH }}
asset_name: ${{ steps.publish_nuget.outputs.PACKAGE_NAME }}
asset_content_type: application/zip

0 comments on commit 318a36d

Please sign in to comment.