Skip to content

Commit dc16373

Browse files
Modify PackAndPushAfterMerge workflow for NuGet push
Updated the workflow to push NuGet packages to the Frends Community Main Feed instead of the previous feed.
1 parent e76472e commit dc16373

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/PackAndPushAfterMerge.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,21 @@ jobs:
2222
- name: Pack release version of task
2323
run: dotnet pack --configuration Release --include-source
2424

25-
- name: Push NuGet package to the (prod) feed
26-
run: dotnet nuget push Frends.Community.SQL\bin\Release\Frends.Community.SQL.*.nupkg --api-key ${{ secrets.COMMUNITY_FEED_API_KEY }} --source https://www.myget.org/F/frends-community/api/v2/package
27-
25+
- name: Get package name
26+
id: package_name
27+
run: |
28+
$pkg = Get-ChildItem -Path . -Filter *.nupkg -Exclude *.symbols.nupkg -Recurse | Select-Object -First 1
29+
echo "full_name=$($pkg.FullName)" >> $env:GITHUB_OUTPUT
30+
echo "base_name=$($pkg.BaseName)" >> $env:GITHUB_OUTPUT
31+
32+
- name: Push to Frends Community Main Feed
33+
shell: bash
34+
run: |
35+
curl -X POST "https://frends-fsp-cloudprod-agent.frendsapp.com/api/community-tasks/v1/push?feed_type=main" \
36+
-H "x-api-key: ${{ secrets.FRENDS_COMMUNITY_TASKS_API_KEY }}" \
37+
-H "Content-Type: application/octet-stream" \
38+
--data-binary @"${{ steps.package_name.outputs.full_name }}"
39+
2840
- name: Create Release
2941
id: create_release
3042
uses: actions/create-release@v1
@@ -34,6 +46,6 @@ jobs:
3446
tag_name: ${{ steps.vars.outputs.version_number }}
3547
release_name: Release ${{ steps.vars.outputs.version_number }}
3648
body: |
37-
You can install the task via frends UI Task View or you can find the NuGet package from https://www.myget.org/F/frends-community/api/v2/package/Frends.Community.SQL/${{ steps.vars.outputs.version_number }}
49+
You can install the task via frends UI Task View or you can find the NuGet at https://feeds.dev.azure.com/frends-platform/frends-tasks/_apis/packaging/Feeds/community-main/packages
3850
draft: false
3951
prerelease: false

0 commit comments

Comments
 (0)