publish.yml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. name: Publish Terminal.Gui to nuget
  2. on:
  3. push:
  4. tags:
  5. - v*
  6. jobs:
  7. publish:
  8. name: build, pack & publish
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. with:
  13. fetch-depth: 0
  14. - name: Setup dotnet
  15. uses: actions/setup-dotnet@v1
  16. with:
  17. dotnet-version: 5.0.100
  18. - name: minver-cli
  19. run: |
  20. dotnet tool install --global minver-cli --version 2.4.0
  21. echo "MINVERVERSIONOVERRIDE=$(minver -t v -d rc)" >> $GITHUB_ENV
  22. #- name: Install dependencies
  23. # run: dotnet restore
  24. #- name: Build
  25. # run: dotnet build --configuration Release --no-restore
  26. #- name: Pack nuget package with symbols
  27. # run: dotnet pack --include-symbols
  28. - name: Publish Terminal.Gui
  29. id: publish_nuget
  30. uses: brandedoutcast/[email protected]
  31. with:
  32. VERSION_STATIC: ${{ env.MINVERVERSIONOVERRIDE }}
  33. NUGET_SOURCE: https://api.nuget.org
  34. # Filepath of the project to be packaged, relative to root of repository
  35. PROJECT_FILE_PATH: Terminal.Gui/Terminal.Gui.csproj
  36. # NuGet package id, used for version detection & defaults to project name
  37. PACKAGE_NAME: Terminal.Gui
  38. # Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
  39. #VERSION_FILE_PATH: Terminal.Gui/Directory.Build.props
  40. # Regex pattern to extract version info in a capturing group
  41. #VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
  42. # Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
  43. # VERSION_STATIC: 1.0.0
  44. # Flag to toggle git tagging, enabled by default
  45. TAG_COMMIT: false
  46. # Format of the git tag, [*] gets replaced with actual version
  47. # TAG_FORMAT: v*
  48. # API key to authenticate with NuGet server
  49. NUGET_KEY: ${{secrets.NUGET_API_KEY}}
  50. # NuGet server uri hosting the packages, defaults to https://api.nuget.org
  51. # NUGET_SOURCE: https://api.nuget.org
  52. # Flag to toggle pushing symbols along with nuget package to the server, disabled by default
  53. # This is broken - see https://github.com/brandedoutcast/publish-nuget/issues/30
  54. INCLUDE_SYMBOLS: false