From 5144428d5f89f38aafc5b77513f149772c7be7da Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Wed, 17 Mar 2021 13:24:52 +0100 Subject: [PATCH 1/2] Master align (#3) Update dotnet.yml repository url property --- .github/workflows/dotnet.yml | 36 +++++-------------- .../SharpApi.Helpers/SharpApi.Helpers.csproj | 3 ++ .../SharpApi.Utility/SharpApi.Utility.csproj | 2 ++ 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9a242a7..08f3542 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 }} @@ -67,36 +67,18 @@ jobs: uses: actions/download-artifact@v1 with: name: nupkg - - name: Push to GitHub Feed - run: | - for f in ./nupkg/*.nupkg - do - echo $f - curl --silent --show-error --fail -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED - done + - name: Add GPR Source + 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 deploy: needs: build 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 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 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 42fa4a06bd9a85f0bba7644ecd0df651391e9184 Mon Sep 17 00:00:00 2001 From: ivano scifoni Date: Wed, 17 Mar 2021 13:45:33 +0100 Subject: [PATCH 2/2] Update dotnet.yml --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 08f3542..56cb032 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/SharpCodeApi/SharpApi/src/Helpers/src/SharpApi.Helpers/bin/Release/*.nupkg prerelease: needs: build if: github.ref == 'refs/heads/develop' @@ -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: dotnet nuget push /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg --source $GITHUB_FEED --api-key $GITHUB_TOKEN --skip-duplicate --no-symbols true + run: dotnet nuget push /home/runner/work/SharpCodeApi/SharpApi/nupkg/**/bin/Release/*.nupkg --source $GITHUB_FEED --api-key $GITHUB_TOKEN --skip-duplicate --no-symbols true deploy: needs: build if: github.event_name == 'release' && startsWith(github.ref, 'refs/heads/v') @@ -81,4 +81,4 @@ jobs: with: name: nupkg - name: Push to NuGet Feed - run: dotnet nuget push /home/runner/work/SharpApi/SharpApi/nupkg/**/bin/Release/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY + run: dotnet nuget push /home/runner/work/SharpCodeApi/SharpApi/nupkg/**/bin/Release/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY