Skip to content

Merge pull request #117 from DynamicsValue/3x-dev #4

Merge pull request #117 from DynamicsValue/3x-dev

Merge pull request #117 from DynamicsValue/3x-dev #4

Workflow file for this run

name: Push to Nuget (3x)
on:
push:
branches: [ 3x ]
paths-ignore:
- 'coverage/**'
- '*.md'
- '*.txt'
env:
dotnet-version: 6.0.407
source-url: "https://api.nuget.org/v3/index.json"
jobs:
build-netcore:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Build
run: pwsh ./build.ps1
env:
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
build-windows:
strategy:
fail-fast: false
matrix:
configuration: ['FAKE_XRM_EASY_9', 'FAKE_XRM_EASY_365', 'FAKE_XRM_EASY_2016','FAKE_XRM_EASY_2015','FAKE_XRM_EASY_2013', 'FAKE_XRM_EASY']
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Build
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
sonar:
needs: build-netcore
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Quality Gate
uses: DynamicsValue/dotnet-sonarscanner@v2.4.7
with:
buildCommand: dotnet build . --configuration 'FAKE_XRM_EASY_9' --framework net6.0
testCommand: dotnet test . --configuration 'FAKE_XRM_EASY_9' --framework net6.0 --verbosity normal --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage
projectKey: ${{ secrets.SONAR_PROJECT_KEY }}
projectName: fake-xrm-easy
sonarOrganisation: dynamicsvalue
beginArguments: >
/d:sonar.verbose="true"
/d:sonar.qualitygate.wait="true"
/d:sonar.cs.opencover.reportsPaths='"coverage/**/coverage.opencover.xml"'
/d:sonar.coverage.exclusions='"tests/**/**"'
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
pack-push:
needs: [build-netcore, build-windows, sonar]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Build
run: pwsh ./build.ps1 -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Pack
run: pwsh ./pack.ps1 -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Push Src
run: nuget.exe push .\nupkgs\FakeXrmEasy.*.nupkg -Source ${{ env.source-url }} -ApiKey ${{ secrets.NUGET_API_KEY }}