brandedoutcast / publish-nuget

📦 GitHub action to automate publishing NuGet packages when project version changes
https://github.com/marketplace/actions/publish-nuget
MIT License
197 stars 101 forks source link

[FEATURE] Dry-run option #83

Open SakuraIsayeki opened 2 years ago

SakuraIsayeki commented 2 years ago

Is your feature request related to a problem? Please describe.

I'm finding it difficult to test my GHA CI pipeline, without making a mess of my package deployments.

As NuGet doesn't allow us reverting package uploads (instead only unlisting/deprecating 'em), I'd like some way to be able to validate my pipeline, including the Publish step, whilst leaving an actual package upload for when I'm sure everything works.

Describe the solution you'd like

A dry-run option, similar to what's commonly found in many Unix executables and commands, would do the trick. The implementation, as easy as it gets, would probably be an input parameter, like:

      - name: Publish to NuGet
        id: publish_nuget
        uses: brandedoutcast/publish-nuget
        with:
          PROJECT_FILE_PATH: MyFabulousProject.csproj
          NUGET_KEY: ${{ secrets.NUGET_TOKEN }}
          DRY_RUN: true

Setting it true would build, package and prep the project as usual, but skip outright the upload phase, and succeed. A notice or warning could even be added, informing tha dry-run is enabled for that CI run.

Describe alternatives you've considered Sadly no alternative is available.

Additional context N/A