diff --git a/.github/workflows/BuildAndTestOnEveryPush.yml b/.github/workflows/BuildAndTestOnEveryPush.yml index 035b95e..3e28381 100644 --- a/.github/workflows/BuildAndTestOnEveryPush.yml +++ b/.github/workflows/BuildAndTestOnEveryPush.yml @@ -28,8 +28,16 @@ jobs: if: runner.os == 'Windows' run: dotnet pack --configuration Release --include-source - - name: Push NuGet package to the testfeed - if: runner.os == 'Windows' - run: dotnet nuget push Frends.Community.PowerShell\bin\Release\Frends.Community.PowerShell.*.nupkg --api-key ${{ secrets.CommunityFeedApiKey }} --source https://www.myget.org/F/frends-community-test/api/v2/package - - + - name: Get package name + id: package_name + run: | + $pkg = Get-ChildItem -Path . -Filter *.nupkg -Exclude *.symbols.nupkg -Recurse | Select-Object -First 1 + echo "full_name=$($pkg.FullName)" >> $env:GITHUB_OUTPUT + + - name: Push to Frends Community Test Feed + shell: bash + run: | + curl -X POST "https://frends-fsp-cloudprod-agent.frendsapp.com/api/community-tasks/v1/push?feed_type=test" \ + -H "x-api-key: ${{ secrets.FRENDS_COMMUNITY_TASKS_API_KEY }}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @"${{ steps.package_name.outputs.full_name }}" diff --git a/.github/workflows/PackAndPushAfterMerge.yml b/.github/workflows/PackAndPushAfterMerge.yml index 5f699fb..8a181c4 100644 --- a/.github/workflows/PackAndPushAfterMerge.yml +++ b/.github/workflows/PackAndPushAfterMerge.yml @@ -16,6 +16,17 @@ jobs: - name: Pack release version of task run: dotnet pack --configuration Release --include-source - - name: Push NuGet package to the (prod) feed - run: dotnet nuget push Frends.Community.PowerShell\bin\Release\Frends.Community.PowerShell.*.nupkg --api-key ${{ secrets.CommunityFeedApiKey }} --source https://www.myget.org/F/frends-community/api/v2/package - + - name: Get package name + id: package_name + run: | + $pkg = Get-ChildItem -Path . -Filter *.nupkg -Exclude *.symbols.nupkg -Recurse | Select-Object -First 1 + echo "full_name=$($pkg.FullName)" >> $env:GITHUB_OUTPUT + echo "base_name=$($pkg.BaseName)" >> $env:GITHUB_OUTPUT + + - name: Push to Frends Community Main Feed + shell: bash + run: | + curl -X POST "https://frends-fsp-cloudprod-agent.frendsapp.com/api/community-tasks/v1/push?feed_type=main" \ + -H "x-api-key: ${{ secrets.FRENDS_COMMUNITY_TASKS_API_KEY }}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @"${{ steps.package_name.outputs.full_name }}"