Rename the CommandAttribute to HandlerAttribute #54 (#55) #29
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: CD-Build | |
| # Note: this is a mixture of windows build and linux deployments | |
| on: | |
| push: | |
| # Runs on all branches so they share a github.run_number increment | |
| branches: [ stable ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore src/System.CommandLine.Minimal.sln | |
| # build solution here instead of project | |
| - name: Build Minimal CommandLine | |
| run: dotnet build src/System.CommandLine.Minimal.sln -c Release --no-restore | |
| # packs all nuget packages at once | |
| - name: Pack MinimalCommandLine Nuget Alpha | |
| run: dotnet pack src/System.CommandLine.Minimal/System.CommandLine.Minimal.csproj -p:PackageVersion=0.5.0.${{github.run_number}}-alpha -o ./packages | |
| - name: Pack MinimalCommandLine Nuget | |
| run: dotnet pack src/System.CommandLine.Minimal/System.CommandLine.Minimal.csproj -p:PackageVersion=0.5.0.${{github.run_number}} -o ./packages | |
| - name: Publish MinimalCommandLine Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Nugets | |
| path: packages/*.nupkg | |
| integration: | |
| needs: build | |
| name: Deploy Nuget-alpha packages | |
| environment: | |
| name: Integration | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download nugets | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: Nugets | |
| - name: Display structure of downloaded files | |
| run: ls -R | |
| - name: Push MinimalCommandLine Nuget | |
| run: dotnet nuget push ./MinimalCommandLine.0.5.0.${{github.run_number}}-alpha.nupkg --api-key ${{secrets.NUGETKEY}} --source https://api.nuget.org/v3/index.json | |
| production: | |
| needs: integration | |
| name: Deploy Nuget packages to production | |
| environment: | |
| name: Production | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download nugets | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: Nugets | |
| - name: Push MinimalCommandLine Nuget | |
| run: dotnet nuget push ./MinimalCommandLine.0.5.0.${{github.run_number}}.nupkg --api-key ${{secrets.NUGETKEY}} --source https://api.nuget.org/v3/index.json |