diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ffd8213..0ea4797e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ on: push: branches: - develop + - stable pull_request: types: [opened, synchronize, reopened] @@ -47,9 +48,6 @@ jobs: with: useConfigFile: true - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1 - - name: Use NuGet > 5.0.0 uses: nuget/setup-nuget@v1 @@ -83,9 +81,9 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} # Needed to get PR information, if any SONAR_TOKEN: ${{secrets.SONAR_TOKEN}} shell: powershell - run: > + run: > .\.sonar\scanner\dotnet-sonarscanner - begin /k:"mkromis_MinoriEditorShell" /o:"mkromis" + begin /k:"mkromis_MinoriEditorShell" /o:"mkromis" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml /v:${{steps.gitversion.outputs.semVer}} @@ -144,5 +142,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: MinoriEditorShell - path: Artifacts/*.7z + path: Artifacts/* if-no-files-found: error diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 837bf05d..00000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,78 +0,0 @@ -#Note: This is a third party action and currently only supports Linux: https://github.com/marketplace/actions/create-zip-file -name: 'Deploy Nugets' - -on: - push: - branches: - - stable - -env: - solution: 'MinoriEditorShell.sln' - buildPlatform: Any CPU - buildConfiguration: Release - -jobs: - build: - runs-on: windows-latest - steps: - - name: 'Checkout Sources' - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - - name: 'Setup msbuild' - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.7 - with: - versionSpec: 5.x - - - name: Setup NuGet - uses: nuget/setup-nuget@v1 - - - name: Determine Version - uses: gittools/actions/gitversion/execute@v0.9.7 - - - run: nuget restore ${{env.solution}} - - - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' - - - name: Create Artifacts - run: | - # Get list of all nupkgs - $nupkgs = Get-ChildItem -Path .\Modules -Filter *.nupkg -Recurse - - $basedir = 'MinoriEditorSystem-' + $env:GitVersion_NuGetVersion - - # Move each item into artifacts - # rm Artifacts -Recurse -Force - mkdir Artifacts\$basedir\Nugets - - # Copy nugets to nuget folder - foreach ($nupkg in $nupkgs) { - $leaf = Split-Path $nupkg -Leaf - $outFile = "Artifacts\$basedir\Nugets\$leaf" - echo $nupkg.FullName ' -> ' $outFile - Copy-Item $nupkg.FullName $outFile - } - - # Copy Demo Folder - #mkdir Artifacts\$basedir\Demos - cp Demos\SimpleDemo\SimpleDemo.WPF\bin\Release\net6.0-windows Artifacts\$basedir\Demos\SimpleDemo.WPF -Recurse - cp Demos\SimpleDemo\SimpleDemo.RibbonWPF\bin\Release\net6.0-windows Artifacts\$basedir\Demos\SimpleDemo.RibbonWPF -Recurse - cp Demos\MinoriDemo\MinoriDemo.WPF\bin\Release\net6.0-windows Artifacts\$basedir\Demos\MinoriDemo.WPF -Recurse - cp Demos\MinoriDemo\MinoriDemo.RibbonWPF\bin\Release\net6.0-windows Artifacts\$basedir\Demos\MinoriDemo.RibbonWPF -Recurse - - # Compress folder into 7z file - cd Artifacts - 7z a "$basedir.7z" $basedir - cd .. - - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - name: MinoriEditorShell - path: Artifacts/*.7z - if-no-files-found: error - \ No newline at end of file