Bump to version 1.1.4 #50
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 Package | |
| on: | |
| # Manual start from the Actions tab or 'gh workflow run nuget.yml --ref <branch|tag>'. | |
| # Packs whatever version the csproj carries on the chosen ref, so a release that the | |
| # tag push did not pick up can be published without deleting and re-pushing the tag. | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' # Trigger on version tags like v1.0.0 | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| # ACadSharp is built from source (external/ACadSharp submodule, which | |
| # itself pulls in CSUtilities as a submodule) | |
| submodules: recursive | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| # ACadSharp's TargetFrameworks include net10.0, so restore needs the .NET 10 SDK | |
| dotnet-version: '10.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore CADability/CADability.csproj | |
| - name: Build | |
| run: dotnet build CADability/CADability.csproj -c Release --no-restore | |
| - name: Pack | |
| run: dotnet pack CADability/CADability.csproj -c Release --no-build -o ./nupkgs | |
| - name: Login to NuGet | |
| uses: NuGet/login@v1 | |
| id: nuget-login | |
| with: | |
| user: dsn27 | |
| - name: Push NuGet package | |
| run: | | |
| $pkg = Get-ChildItem -Path ./nupkgs -Filter "*.nupkg" | Select-Object -First 1 | |
| dotnet nuget push "$($pkg.FullName)" --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate |