From 3225f284dd94d6708e6ddf7925588022132cb0fb Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Tue, 16 Mar 2021 18:38:55 +0100 Subject: [PATCH 01/12] workflowalign (#2) * Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index adab3fd..9a242a7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -51,13 +51,13 @@ jobs: run: dotnet test ./SharpApi.sln -c Release --no-build - name: Pack if: matrix.os == 'ubuntu-latest' - run: dotnet pack -v normal -c Release --no-restore --no-build -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }}-${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }} ./SharpApi.sln + run: dotnet pack -v normal -c Release --no-restore --no-build -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} ./SharpApi.sln - name: Upload Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v2 with: name: nupkg - path: ./SharpHelpers/${{ env.PROJECT_NAME }}/bin/Release/*.nupkg + path: /home/runner/work/SharpApi/SharpApi/src/Helpers/src/SharpApi.Helpers/bin/Release/*.nupkg prerelease: needs: build if: github.ref == 'refs/heads/develop' From 53cf7b861ece0ad593997a7f3203235f958e3afe Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Tue, 16 Mar 2021 18:46:38 +0100 Subject: [PATCH 02/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9a242a7..73f53b0 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -57,7 +57,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: nupkg - path: /home/runner/work/SharpApi/SharpApi/src/Helpers/src/SharpApi.Helpers/bin/Release/*.nupkg + path: /home/runner/work/SharpApi/SharpApi/src/Helpers/src/**/bin/Release/*.nupkg prerelease: needs: build if: github.ref == 'refs/heads/develop' From 3ff6b773ed24d7ff64800bdad59a2a035ecd9c4b Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Tue, 16 Mar 2021 18:54:30 +0100 Subject: [PATCH 03/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 73f53b0..7d4b3f3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -69,7 +69,7 @@ jobs: name: nupkg - name: Push to GitHub Feed run: | - for f in ./nupkg/*.nupkg + for f in /home/runner/work/SharpApi/SharpApi/nupkg/*.nupkg do echo $f curl --silent --show-error --fail -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED From ee9029ed3ca7255e0c103a1a6af23e9c43cf2642 Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Tue, 16 Mar 2021 18:59:44 +0100 Subject: [PATCH 04/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7d4b3f3..c2e87e7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -69,7 +69,7 @@ jobs: name: nupkg - name: Push to GitHub Feed run: | - for f in /home/runner/work/SharpApi/SharpApi/nupkg/*.nupkg + for f in /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg do echo $f curl --silent --show-error --fail -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED From 88c9114378deff181232933fade59cf165783a66 Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Wed, 17 Mar 2021 08:49:06 +0100 Subject: [PATCH 05/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c2e87e7..c315cf4 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -72,6 +72,7 @@ jobs: for f in /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg do echo $f + echo $GITHUB_TOKEN curl --silent --show-error --fail -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED done deploy: From 2c8894a611ce45be8af9ee938f5daabf2f622071 Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Wed, 17 Mar 2021 08:54:25 +0100 Subject: [PATCH 06/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c315cf4..950c60c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,7 +15,7 @@ env: # GitHub Packages Feed settings GITHUB_FEED: https://nuget.pkg.github.com/shaprcode-it/ GITHUB_USER: iscifoni - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.SHARPAPI_GITHUB_TOKEN }} # Official NuGet Feed settings NUGET_FEED: https://api.nuget.org/v3/index.json NUGET_KEY: ${{ secrets.NUGET_TOKEN }} From bfc826bb48e416a6eb740c805cf648f2535e0b70 Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Wed, 17 Mar 2021 09:07:24 +0100 Subject: [PATCH 07/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 950c60c..fa66964 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,7 +13,7 @@ env: # Project name to pack and publish PROJECT_NAME: SharpHelpers # GitHub Packages Feed settings - GITHUB_FEED: https://nuget.pkg.github.com/shaprcode-it/ + GITHUB_FEED: https://nuget.pkg.github.com/shaprcode-it/index.json GITHUB_USER: iscifoni GITHUB_TOKEN: ${{ secrets.SHARPAPI_GITHUB_TOKEN }} # Official NuGet Feed settings @@ -67,6 +67,10 @@ jobs: uses: actions/download-artifact@v1 with: name: nupkg + - name: Add GPR Source + run: nuget sources add -name "GPR" -Source $GITHUB_FEED -Username $GITHUB_USER -Password $GITHUB_TOKEN + - name: nuget push + run: nuget push /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg -Source "GPR" -SkipDuplicate - name: Push to GitHub Feed run: | for f in /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg From bc022bc84f16d0b6195b231440290dbcf9ed5af0 Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Wed, 17 Mar 2021 09:30:06 +0100 Subject: [PATCH 08/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index fa66964..5c005d4 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,7 +13,7 @@ env: # Project name to pack and publish PROJECT_NAME: SharpHelpers # GitHub Packages Feed settings - GITHUB_FEED: https://nuget.pkg.github.com/shaprcode-it/index.json + GITHUB_FEED: https://nuget.pkg.github.com/shaprcode-it/ GITHUB_USER: iscifoni GITHUB_TOKEN: ${{ secrets.SHARPAPI_GITHUB_TOKEN }} # Official NuGet Feed settings @@ -70,7 +70,7 @@ jobs: - name: Add GPR Source run: nuget sources add -name "GPR" -Source $GITHUB_FEED -Username $GITHUB_USER -Password $GITHUB_TOKEN - name: nuget push - run: nuget push /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg -Source "GPR" -SkipDuplicate + run: dotnet nuget push /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg --source $GITHUB_FEED --api-key $GITHUB_TOKEN --skip-duplicate --no-symbols true - name: Push to GitHub Feed run: | for f in /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg From 6c7287c46e2054fd9a077b3e3c78ceeccaefde43 Mon Sep 17 00:00:00 2001 From: Ivano Scifoni Date: Wed, 17 Mar 2021 09:41:23 +0100 Subject: [PATCH 09/12] repository url property --- src/Helpers/src/SharpApi.Helpers/SharpApi.Helpers.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Helpers/src/SharpApi.Helpers/SharpApi.Helpers.csproj b/src/Helpers/src/SharpApi.Helpers/SharpApi.Helpers.csproj index 65f83d1..169aaca 100644 --- a/src/Helpers/src/SharpApi.Helpers/SharpApi.Helpers.csproj +++ b/src/Helpers/src/SharpApi.Helpers/SharpApi.Helpers.csproj @@ -3,6 +3,9 @@ netstandard2.1 annotations + https://github.com/sharpcode-it/SharpApi + https://github.com/sharpcode-it/SharpApi + github From 6b63cbdf57927878a03690e463ed583b46e0eba5 Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Wed, 17 Mar 2021 09:47:22 +0100 Subject: [PATCH 10/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 5c005d4..9df60e9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -57,7 +57,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: nupkg - path: /home/runner/work/SharpApi/SharpApi/src/Helpers/src/**/bin/Release/*.nupkg + path: /home/runner/work/SharpApi/SharpApi/src/**/src/**/bin/Release/*.nupkg prerelease: needs: build if: github.ref == 'refs/heads/develop' @@ -71,14 +71,6 @@ jobs: run: nuget sources add -name "GPR" -Source $GITHUB_FEED -Username $GITHUB_USER -Password $GITHUB_TOKEN - name: nuget push run: dotnet nuget push /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg --source $GITHUB_FEED --api-key $GITHUB_TOKEN --skip-duplicate --no-symbols true - - name: Push to GitHub Feed - run: | - for f in /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg - do - echo $f - echo $GITHUB_TOKEN - curl --silent --show-error --fail -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED - done deploy: needs: build if: github.event_name == 'release' && startsWith(github.ref, 'refs/heads/v') From 153c4a9a6df6343d6fd309f03cd4d004bc8e9ae2 Mon Sep 17 00:00:00 2001 From: Ivano Scifoni Date: Wed, 17 Mar 2021 10:46:56 +0100 Subject: [PATCH 11/12] fix repositoryurl --- src/Utility/src/SharpApi.Utility/SharpApi.Utility.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Utility/src/SharpApi.Utility/SharpApi.Utility.csproj b/src/Utility/src/SharpApi.Utility/SharpApi.Utility.csproj index 57ddecf..c977e57 100644 --- a/src/Utility/src/SharpApi.Utility/SharpApi.Utility.csproj +++ b/src/Utility/src/SharpApi.Utility/SharpApi.Utility.csproj @@ -2,6 +2,8 @@ netstandard2.1 + https://github.com/sharpcode-it/SharpApi + https://github.com/sharpcode-it/SharpApi From c387da593a8b298b4dacb9dd644746d58647f5da Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Wed, 17 Mar 2021 12:50:24 +0100 Subject: [PATCH 12/12] Update dotnet.yml --- .github/workflows/dotnet.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9df60e9..260f27e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -76,24 +76,9 @@ jobs: if: github.event_name == 'release' && startsWith(github.ref, 'refs/heads/v') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - name: Download Artifact + uses: actions/download-artifact@v1 with: - dotnet-version: 5.0.100 - - name: Create Release NuGet package - run: | - arrTag=(${GITHUB_REF//\// }) - VERSION="${arrTag[2]}" - echo Version: $VERSION - VERSION="${VERSION//v}" - echo Clean Version: $VERSION - dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/$PROJECT_NAME/$PROJECT_NAME.*proj - - name: Push to GitHub Feed - run: | - for f in ./nupkg/*.nupkg - do - curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED - done + name: nupkg - name: Push to NuGet Feed - run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY + run: dotnet nuget push /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY