diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6ddcdfc11..770088d4b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,12 +1,15 @@ -name: publish Terminal.Gui to nuget +name: Publish Terminal.Gui to nuget on: push: - branches: - - master # Default release branch + tags: + - v* + jobs: + publish: name: build, pack & publish runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 with: @@ -17,11 +20,24 @@ jobs: with: dotnet-version: 5.0.100 - # Publish - - name: publish on version change + - name: minver-cli + run: | + dotnet tool install --global minver-cli --version 2.4.0 + echo "MINVERVERSIONOVERRIDE=$(minver -t v -d rc)" >> $GITHUB_ENV + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Publish Terminal.Gui id: publish_nuget - uses: brandedoutcast/publish-nuget@v2 + uses: brandedoutcast/publish-nuget@v2.5.5 with: + VERSION_STATIC: ${{ env.MINVERVERSIONOVERRIDE }} + NUGET_SOURCE: https://api.nuget.org + # Filepath of the project to be packaged, relative to root of repository PROJECT_FILE_PATH: Terminal.Gui/Terminal.Gui.csproj @@ -29,16 +45,16 @@ jobs: PACKAGE_NAME: Terminal.Gui # Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH - VERSION_FILE_PATH: Terminal.Gui/Directory.Build.props + #VERSION_FILE_PATH: Terminal.Gui/Directory.Build.props # Regex pattern to extract version info in a capturing group - VERSION_REGEX: ^\s*(.*)<\/Version>\s*$ + #VERSION_REGEX: ^\s*(.*)<\/Version>\s*$ # Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX # VERSION_STATIC: 1.0.0 # Flag to toggle git tagging, enabled by default - TAG_COMMIT: true + TAG_COMMIT: false # Format of the git tag, [*] gets replaced with actual version # TAG_FORMAT: v* @@ -50,4 +66,4 @@ jobs: # NUGET_SOURCE: https://api.nuget.org # Flag to toggle pushing symbols along with nuget package to the server, disabled by default - INCLUDE_SYMBOLS: false + INCLUDE_SYMBOLS: true diff --git a/Terminal.Gui/Directory.Build.props b/Terminal.Gui/Directory.Build.props index ed8b68472..6bf2f2e2c 100644 --- a/Terminal.Gui/Directory.Build.props +++ b/Terminal.Gui/Directory.Build.props @@ -3,26 +3,7 @@ Miguel de Icaza, Charlie Kindel (@tig), @BDisp diff --git a/Terminal.Gui/README.md b/Terminal.Gui/README.md index 461bdd001..e15ea8bd0 100644 --- a/Terminal.Gui/README.md +++ b/Terminal.Gui/README.md @@ -20,6 +20,42 @@ Contains all files required to build the **Terminal.Gui** library (and nuget pac - `Views/` - A folder (not namespace) containing the source for all built-in classes that drive from `View` (non-modals). - `Windows/` - A folder (not namespace) containing the source all built-in classes that derive from `Window`. +## Version numbers + +Version info for Terminal.Gui is managed by MinVer (https://github.com/adamralph/minver). + +To release a new version simply tag a commit + +```powershell +git tag major.minor.patch.build.height +``` + +`patch` can indicate pre-release or not + +e.g: + +```powershell +git tag 1.3.4-beta.5 +``` + + or + +```powershell +git tag 2.3.4.5 +``` + +Then rebuild the project and the version info will be updated. + +## Nuget + +https://www.nuget.org/packages/Terminal.Gui + +When the `.patch` changes a new nuget package will be generated when the PR is merged to master as part of CI/CD. + +If the version is pre-release (includes a hyphen, e.g. `1.3.4-beta.5`) the Nuget package will be tagged as pre-release. + +Miguel can hide defunct/old nuget packages. + ## Contributing See [CONTRIBUTING.md](https://github.com/migueldeicaza/gui.cs/blob/master/CONTRIBUTING.md). diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj index b07a66f0c..487d77ae2 100644 --- a/Terminal.Gui/Terminal.Gui.csproj +++ b/Terminal.Gui/Terminal.Gui.csproj @@ -5,15 +5,10 @@ Terminal.Gui bin\Release\Terminal.Gui.xml true - - true Terminal.Gui - - - MIT https://github.com/migueldeicaza/gui.cs/ csharp, terminal, c#, f#, gui, toolkit, console @@ -22,6 +17,10 @@ Application framework for creating modern console applications using .NET Terminal.Gui is a framework for creating console user interfaces + v1.0.0-beta.1 + * Now using MinVer to generate version numbers from git tags. + * Updated publish-to-nuget to work with minver + v1.0.0-pre.9 * NEW CONTROL: TreeView - Thanks @tznind! * Fixes #1066. View sizing across the various terminals has been fixed; works in Windows Terminal again - thanks @bdisp @@ -189,13 +188,6 @@ TRACE;DEBUG_IDISPOSABLE - @@ -203,11 +195,6 @@ all runtime; build; native; contentfiles; analyzers -