Enhance workflow to push NuGet package to Frends feed #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: BuildMaster.yml | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| name: Build master on ubuntu-latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Pack release version | |
| run: dotnet pack --configuration Release | |
| - 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 }}" |