diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dependency-updates.yml similarity index 63% rename from .github/workflows/dotnet-desktop.yml rename to .github/workflows/dependency-updates.yml index 66d412d..908a086 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dependency-updates.yml @@ -8,7 +8,7 @@ on: jobs: updatePackages: runs-on: ubuntu-latest - + steps: - name: Checkout uses: actions/checkout@v3 @@ -17,30 +17,45 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: 7.x.x - + - name: Install dotnet-outdated run: dotnet tool install --global dotnet-outdated-tool - + - name: Update packages + id: outdated run: dotnet outdated CleanArchitecture.sln -u - + + - name: Check for changes + id: changes + run: git diff --exit-code || echo "::set-output name=changes::true" + - name: Commit and push changes + if: steps.changes.outputs.changes == 'true' run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" git add . git commit -m "Update packages" git push - + - name: Get current date + if: steps.changes.outputs.changes == 'true' id: date run: echo "::set-output name=date::$(date +'%d_%m_%Y')" - name: Create Pull Request + if: steps.changes.outputs.changes == 'true' uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.GITHUB_TOKEN }} branch: "update/${{ steps.date.outputs.date }}" - title: Automatic Package Update + label: dependencies + delete-branch: true + title: "Automatic Package Update ${{ steps.date.outputs.date }}" body: | - This pull request includes updates to the packages in the solution. + This pull request includes updates to the packages in the solution. + + **Package Updates:** + ``` + ${{ steps.outdated.outputs.stdout }} + ``` diff --git a/CleanArchitecture.Application.Tests/CleanArchitecture.Application.Tests.csproj b/CleanArchitecture.Application.Tests/CleanArchitecture.Application.Tests.csproj index 895e978..b9ac714 100644 --- a/CleanArchitecture.Application.Tests/CleanArchitecture.Application.Tests.csproj +++ b/CleanArchitecture.Application.Tests/CleanArchitecture.Application.Tests.csproj @@ -12,8 +12,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all