Skip to content

Recording options and Bug Fixes #215

Recording options and Bug Fixes

Recording options and Bug Fixes #215

Workflow file for this run

name: Build for CI
on:
push:
branches: [ "main" ]
paths-ignore:
- "**.md"
pull_request:
branches: [ "main" ]
jobs:
build-plugin-ci:
runs-on: windows-latest
env:
NuGetVersion: "3.0.0-preview2.${{ github.run_id }}${{ github.run_attempt }}"
steps:
- uses: actions/checkout@v4
- name: Restore dependencies
run: dotnet restore src\Plugin.Maui.Audio\Plugin.Maui.Audio.csproj
- name: Build
run: dotnet build src\Plugin.Maui.Audio\Plugin.Maui.Audio.csproj -c Release
- name: Pack
run: dotnet pack src\Plugin.Maui.Audio\Plugin.Maui.Audio.csproj -o output -p:PackageVersion=${{ env.NuGetVersion }}
- name: Add NuGet Source for Push
run: dotnet nuget add source https://jfversluis.pkgs.visualstudio.com/Plugin.Maui.Audio/_packaging/Plugin.Maui.Audio/nuget/v3/index.json --name PrivateFeed --username ${{ secrets.PUBLISH_USER }} --password ${{ secrets.PUBLISH_PAT }}
- name: Push
run: dotnet nuget push "output\*.nupkg" --source PrivateFeed --api-key AzureArtifacts
- name: Create status
if: success() && github.event_name == 'pull_request'
shell: bash
run: |
curl --request POST \
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--fail \
--data-binary @- << EOF
{
"state": "success",
"context": "NuGet ${{ env.NuGetVersion }}",
"description": "Feed: https://jfversluis.pkgs.visualstudio.com/Plugin.Maui.Audio/_packaging/Plugin.Maui.Audio/nuget/v3/index.json",
"target_url": "https://github.com/jfversluis/Plugin.Maui.Audio/wiki/Preview-Packages",
"output": {
"title": "Install NuGets Generated by Pull Requests",
"summary": "A NuGet package has been generated as part of pull request #${{ github.event.number }}. Note that these versions do not necessarily represent (upcoming) releases so while it's great to test things out, make sure you don't use this NuGet in production, things might change later or not be merged at all. Please do let us know the findings from your testing with this! The URL for the NuGet feed is: https://jfversluis.pkgs.visualstudio.com/Plugin.Maui.Audio/_packaging/Plugin.Maui.Audio/nuget/v3/index.json. The version number of this NuGet package is: ${{ env.NuGetVersion }} Detailed instructions on how to add a NuGet feed to your Visual Studio can be found on [Microsoft Learn](https://learn.microsoft.com/azure/devops/artifacts/nuget/consume)."
}
}
EOF