diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce43f2c1..8852cb0e 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}} @@ -125,11 +123,6 @@ jobs: cp Demos\MinoriDemo\MinoriDemo.WPF\bin\Release\net7.0-windows Artifacts\$basedir\Demos\MinoriDemo.WPF -Recurse cp Demos\MinoriDemo\MinoriDemo.RibbonWPF\bin\Release\net7.0-windows Artifacts\$basedir\Demos\MinoriDemo.RibbonWPF -Recurse - # Compress folder into 7z file - cd Artifacts - 7z a "$basedir.7z" $basedir - cd .. - - name: Test run: dotnet test ${{env.solution}} --collect:"XPlat Code Coverage" --settings coverlet.runsettings @@ -144,5 +137,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 aa80e8f7..00000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,74 +0,0 @@ -#Note: This is a third party action and currently only supports Linux: https://github.com/marketplace/actions/create-zip-file - -name: ${{ env.GitVersion.NuGetVersion }} - -env: - solution: '**/MinoriEditorShell.sln' - buildPlatform: Any CPU - buildConfiguration: Release - -on: - push: - branches: - - stable -jobs: - build: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - uses: microsoft/setup-msbuild@v1.0.2 - - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.7 - with: - versionSpec: 5.x - - name: Use NuGet > 5.0.0 - uses: nuget/setup-nuget@v1 - - name: GitVersion - uses: gittools/actions/gitversion/execute@v0.9.7 - with: - updateAssemblyInfo: true - - run: nuget restore ${{env.solution}} - - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' - - name: Copy Nugets to demo folder - run: Copy '${{ env.agent.builddirectory }}/**/*.nupkg' '${{ env.Build.BinariesDirectory }}\Minori-${{ env.GitVersion.NuGetVersion }}\Nugets' - - name: Copy Nuget Files to artifacts - run: Copy '${{ env.agent.builddirectory }}/**/*.nupkg' '${{ github.workspace }}' - - - name: Copy SimpleDemo.WPF Files - run: | - Copy 'Demos/SimpleDemo/SimpleDemo.Wpf/bin/Release/*.exe - *.dll - *\*.dll - ' '${{ env.Build.BinariesDirectory }}/Minori-${{ env.GitVersion.NuGetVersion }}/Demos/SimpleDemo' - - - name: Copy SimpleDemo.RibbonWPF Files - run: | - Copy 'Demos/SimpleDemo/SimpleDemo.RibbonWpf/bin/Release/*.exe - *.dll - */*.dll - ' '${{ env.Build.BinariesDirectory }}/Minori-${{ env.GitVersion.NuGetVersion }}/Demos/SimpleDemo' - - - name: Copy MinoriDemo.WPF Files - run: | - Copy 'Demos/MinoriDemo/MinoriDemo.Wpf/bin/Release/*.exe - *.dll - */*.dll - ' '${{ env.Build.BinariesDirectory }}/Minori-${{ env.GitVersion.NuGetVersion }}/Demos/MinoriDemo' - - - name: Copy MinoriEditorShell.RibbonWPF Files - run: | - Copy 'Demos/MinoriDemo/MinoriDemo.RibbonWpf/bin/Release/*.exe - *.dll - */*.dll - ' '${{ env.Build.BinariesDirectory }}/Minori-${{ env.GitVersion.NuGetVersion }}/Demos/MinoriDemo' - - - # 'Note: This is a third party action and currently only supports Linux: https://github.com/marketplace/actions/create-zip-file' - uses: montudor/action-zip@v0.1.0 - with: - args: zip -qq -r ${{ github.workspace }}/Minori-${{ env.GitVersion.NuGetVersion }}.7z ${{ env.Build.BinariesDirectory }}\Minori-${{ env.GitVersion.NuGetVersion }} - - - uses: actions/upload-artifact@v2 - with: - path: ${{ github.workspace }} - name: drop - \ No newline at end of file