Publish ALL EventPi library packages (17 total) #5
Workflow file for this run
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: Publish NuGet Packages | |
| on: | |
| push: | |
| tags: | |
| - 'event-pi/*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to publish (e.g., 1.0.11.35)' | |
| required: true | |
| type: string | |
| env: | |
| DOTNET_VERSION: '10.0.x' | |
| CONFIGURATION: Release | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 9.0.x | |
| 10.0.x | |
| - name: Extract version from tag | |
| id: get_version | |
| run: | | |
| if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
| VERSION="${{ github.event.inputs.version }}" | |
| else | |
| # Extract version from tag format: event-pi/1.0.11.35 | |
| VERSION=${GITHUB_REF#refs/tags/event-pi/} | |
| fi | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Publishing version: $VERSION" | |
| - name: Restore and build all packages | |
| run: | | |
| # Build in dependency order | |
| dotnet build src/EventPi.Abstractions/EventPi.Abstractions.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Threading/EventPi.Threading.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.SharedMemory/EventPi.SharedMemory.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Pid/EventPi.Pid.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.SignalProcessing/EventPi.SignalProcessing.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Advertiser/EventPi.Advertiser.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.NetworkMonitor/EventPi.NetworkMonitor.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.EventStore/EventPi.EventStore.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.AutoUpdate/EventPi.AutoUpdate.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Events.MachineWork/EventPi.Events.MachineWork.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Services.Camera.Contract/EventPi.Services.Camera.Contract.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Services.Camera/EventPi.Services.Camera.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Services.MachineWorkTime/EventPi.Services.MachineWorkTime.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Services.NetworkMonitor.Contract/EventPi.Services.NetworkMonitor.Contract.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.Services.NetworkMonitor/EventPi.Services.NetworkMonitor.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.UI/EventPi.UI.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| dotnet build src/EventPi.SimpleAPIToPWM/EventPi.SimpleAPIToPWM/EventPi.SimpleAPIToPWM.csproj --configuration ${{ env.CONFIGURATION }} /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Abstractions | |
| run: | | |
| dotnet pack src/EventPi.Abstractions/EventPi.Abstractions.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Threading | |
| run: | | |
| dotnet pack src/EventPi.Threading/EventPi.Threading.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.SharedMemory | |
| run: | | |
| dotnet pack src/EventPi.SharedMemory/EventPi.SharedMemory.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Pid | |
| run: | | |
| dotnet pack src/EventPi.Pid/EventPi.Pid.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.SignalProcessing | |
| run: | | |
| dotnet pack src/EventPi.SignalProcessing/EventPi.SignalProcessing.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Advertiser | |
| run: | | |
| dotnet pack src/EventPi.Advertiser/EventPi.Advertiser.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.NetworkMonitor | |
| run: | | |
| dotnet pack src/EventPi.NetworkMonitor/EventPi.NetworkMonitor.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.EventStore | |
| run: | | |
| dotnet pack src/EventPi.EventStore/EventPi.EventStore.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.AutoUpdate | |
| run: | | |
| dotnet pack src/EventPi.AutoUpdate/EventPi.AutoUpdate.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Events.MachineWork | |
| run: | | |
| dotnet pack src/EventPi.Events.MachineWork/EventPi.Events.MachineWork.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Services.Camera.Contract | |
| run: | | |
| dotnet pack src/EventPi.Services.Camera.Contract/EventPi.Services.Camera.Contract.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Services.Camera | |
| run: | | |
| dotnet pack src/EventPi.Services.Camera/EventPi.Services.Camera.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Services.MachineWorkTime | |
| run: | | |
| dotnet pack src/EventPi.Services.MachineWorkTime/EventPi.Services.MachineWorkTime.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Services.NetworkMonitor.Contract | |
| run: | | |
| dotnet pack src/EventPi.Services.NetworkMonitor.Contract/EventPi.Services.NetworkMonitor.Contract.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.Services.NetworkMonitor | |
| run: | | |
| dotnet pack src/EventPi.Services.NetworkMonitor/EventPi.Services.NetworkMonitor.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.UI | |
| run: | | |
| dotnet pack src/EventPi.UI/EventPi.UI.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: Pack EventPi.SimpleAPIToPWM | |
| run: | | |
| dotnet pack src/EventPi.SimpleAPIToPWM/EventPi.SimpleAPIToPWM/EventPi.SimpleAPIToPWM.csproj \ | |
| --configuration ${{ env.CONFIGURATION }} \ | |
| --no-build \ | |
| --output ./artifacts \ | |
| /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} | |
| - name: List artifacts | |
| run: ls -lh ./artifacts | |
| - name: Publish to NuGet.org | |
| run: | | |
| dotnet nuget push "./artifacts/*.nupkg" \ | |
| --api-key ${{ secrets.NUGET_API_KEY }} \ | |
| --source https://api.nuget.org/v3/index.json \ | |
| --skip-duplicate | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-packages-${{ steps.get_version.outputs.VERSION }} | |
| path: ./artifacts/*.nupkg | |
| retention-days: 30 |