From 8ede5a78cff70b040c8b5319e8fe6dc2840317f2 Mon Sep 17 00:00:00 2001 From: George Drak Date: Wed, 15 Feb 2023 21:24:27 +0500 Subject: [PATCH] ci: speed up packages --- .github/workflows/main.yml | 2 +- .github/workflows/release.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 23fe934eb..8730cbace 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: - name: Build run: dotnet build -c Release - name: Create packages - run: find ./src -type f -name '*.csproj' -exec dotnet pack --no-build -c Release -o $(pwd)/packages {} \; + run: find ./src -type f -name '*.csproj' | xargs -n 1 -P 10 dotnet pack --no-build -c Release -o $(pwd)/packages apps: runs-on: ubuntu-latest container: ghcr.io/sitkoru/actions-container diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c520964a..9f579ab31 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,13 +32,13 @@ jobs: - name: Build run: dotnet build -c Release /p:Version=${{ steps.prep.outputs.version }} - name: Create packages - run: find ./src -type f -name '*.csproj' -exec dotnet pack --no-build -c Release /p:Version=${{ steps.prep.outputs.version }} -o $(pwd)/packages {} \; + run: find ./src -type f -name '*.csproj' | xargs -n 1 -P 10 dotnet pack --no-build -c Release /p:Version=${{ steps.prep.outputs.version }} -o $(pwd)/packages - name: Push to Github Packages - run: find packages -type f -name 'Sitko.Core.*.nupkg' -print0 | xargs -0 -n 10 -P 4 dotnet nuget push -s https://nuget.pkg.github.com/sitkoru/index.json --skip-duplicate --no-symbols -k ${GITHUB_TOKEN} + run: find packages -type f -name 'Sitko.Core.*.nupkg' -print0 | xargs -0 -n 10 -P 4 dotnet nuget push -s https://nuget.pkg.github.com/sitkoru/index.json --skip-duplicate --no-symbols -k ${GITHUB_TOKEN} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Push to Nuget - run: find packages -type f -name 'Sitko.Core.*.nupkg' -print0 | xargs -0 -n 10 -P 4 dotnet nuget push -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} + run: find packages -type f -name 'Sitko.Core.*.nupkg' -print0 | xargs -0 -n 10 -P 4 dotnet nuget push -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} - name: Download Sitko.Core uses: actions/checkout@v3 with: