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

External version resolution #17

Closed lbotinelly closed 4 years ago

lbotinelly commented 4 years ago

This PR adds a new input, VERSION_STATIC.

In cases where project version is controlled by a 3rd-party like Nerdbank.GitVersioning there may be no <Version> entries in the project's *.csproj file, causing version resolution to fail.

This input allows the externally generated SEMVER value to be passed at job execution. Example:

      - name: Nerdbank.GitVersioning
        uses: AArnott/nbgv@v0.3
        with:
          setAllVars: true

      - uses: rohith/publish-nuget@v2
        with:
          PROJECT_FILE_PATH: nbgvProject/nbgvProject.csproj
          VERSION_STATIC: ${{env.NBGV_Version}}
brandedoutcast commented 4 years ago

Thanks for the PR 🤝

lbotinelly commented 4 years ago

Happy to contribute, thanks for writing this Action!