-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/issue65 remove full framework (#66)
* Added build.yml * Updated target framework * Removed old framework specific code * Removed ReflectionExtensions * Updated documentation +semver: breaking
- Loading branch information
1 parent
8313f09
commit 0983265
Showing
127 changed files
with
2,048 additions
and
2,469 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,141 @@ | ||
name: CI | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# for any branch or version tag | ||
push: | ||
branches: | ||
- '**' | ||
tags: | ||
- 'v*.*.*' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: ResolveProject | ||
shell: pwsh | ||
run: Write-Host "::set-env name=PROJECT_NAME::$(${env:GITHUB_REPOSITORY}.substring(${env:GITHUB_REPOSITORY}.IndexOf('/') + 1))" | ||
|
||
- name: Fetch tags and master for GitVersion | ||
run: | | ||
git fetch --tags | ||
git branch --create-reflog master origin/master | ||
- name: GitVersion | ||
id: gitversion # step id used as reference for output values | ||
uses: roryprimrose/rungitversion@v1 | ||
|
||
- name: Update project version | ||
uses: roryprimrose/set-vs-sdk-project-version@v1 | ||
with: | ||
version: ${{ steps.gitversion.outputs.NuGetVersionV2 }} | ||
assemblyVersion: ${{ steps.gitversion.outputs.AssemblySemVer }} | ||
fileVersion: ${{ steps.gitversion.outputs.MajorMinorPatch }} | ||
informationalVersion: ${{ steps.gitversion.outputs.InformationalVersion }} | ||
|
||
- name: Setup dotnet v2.1 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '2.1.300' # SDK Version to use. | ||
|
||
- name: Setup dotnet v3.1 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '3.1.100' # SDK Version to use. | ||
|
||
# This step is required while waiting on https://github.com/actions/setup-dotnet/issues/25 to be resolved | ||
- name: .net SxS | ||
run: rsync -a ${DOTNET_ROOT/3.1.100/2.1.300}/* $DOTNET_ROOT/ | ||
|
||
- name: Restore | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build -c Release --no-restore | ||
|
||
- name: Test | ||
run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutput="$GITHUB_WORKSPACE/coverage/" /p:MergeWith="$GITHUB_WORKSPACE/coverage/coverage.json" /p:CoverletOutputFormat="lcov%2cjson" -m:1 | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
path-to-lcov: /home/runner/work/${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}/coverage/coverage.info | ||
|
||
- name: Pack | ||
run: dotnet pack "./${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj" -c Release --no-build --include-symbols -o $GITHUB_WORKSPACE/staging | ||
|
||
- name: Publish build artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: packages | ||
path: staging | ||
|
||
- name: Setup nuget | ||
uses: olegtarasov/download-nuget@v1 | ||
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | ||
|
||
- name: Publish to MyGet.org | ||
env: | ||
MYGET_APIKEY: ${{ secrets.MYGET_APIKEY }} | ||
run: mono $NUGET_EXE push $GITHUB_WORKSPACE/staging/${{ env.PROJECT_NAME }}.*.symbols.nupkg $MYGET_APIKEY -source https://www.myget.org/F/neovolve/api/v2/package | ||
if: github.event_name == 'pull_request' | ||
|
||
# - name: Add GitHub registry to NuGet config | ||
# run: mono $NUGET_EXE sources add -name "GPR" -Source https://nuget.pkg.github.com/divergic/index.json -UserName roryprimrose -Password ${{ secrets.GITHUB_TOKEN }} | ||
# if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | ||
# | ||
# - name: Push generated package to GitHub registry | ||
# run: mono $NUGET_EXE push $GITHUB_WORKSPACE/staging/${{ env.PROJECT_NAME }}.*.symbols.nupkg -Source "GPR" | ||
# if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | ||
|
||
- name: Publish to NuGet.org | ||
env: | ||
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }} | ||
run: mono $NUGET_EXE push $GITHUB_WORKSPACE/staging/${{ env.PROJECT_NAME }}.*.symbols.nupkg $NUGET_APIKEY -source https://api.nuget.org/v3/index.json | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1.0.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.gitversion.outputs.NuGetVersionV2 }} | ||
release_name: Release ${{ steps.gitversion.outputs.NuGetVersionV2 }} | ||
draft: false | ||
prerelease: ${{ contains(steps.gitversion.outputs.NuGetVersionV2, 'beta') }} | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | ||
|
||
- name: Upload Release Asset for package | ||
id: upload-release-asset-package | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: staging/${{ env.PROJECT_NAME }}.${{ steps.gitversion.outputs.NuGetVersionV2 }}.nupkg | ||
asset_name: ${{ env.PROJECT_NAME }}.${{ steps.gitversion.outputs.NuGetVersionV2 }}.nupkg | ||
asset_content_type: application/zip | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | ||
|
||
- name: Upload Release Asset for symbol package | ||
id: upload-release-asset-symbolpackage | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: staging/${{ env.PROJECT_NAME }}.${{ steps.gitversion.outputs.NuGetVersionV2 }}.symbols.nupkg | ||
asset_name: ${{ env.PROJECT_NAME }}.${{ steps.gitversion.outputs.NuGetVersionV2 }}.symbols.nupkg | ||
asset_content_type: application/zip | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') |
17 changes: 12 additions & 5 deletions
17
ModelBuilder.Synchronous.UnitTests/ModelBuilder.Synchronous.UnitTests.csproj
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
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
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
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
Oops, something went wrong.