From b361f74b066271af0946d2e97c8023e99e40eda2 Mon Sep 17 00:00:00 2001
From: srothgan <141313976+srothgan@users.noreply.github.com>
Date: Wed, 18 Feb 2026 12:39:59 +0100
Subject: [PATCH] chore: rename crate to tui-textarea-2 and update
metadata/docs links (#2)
* chore: rename crate to tui-textarea-2 and update metadata/docs links
* chore: prepare v0.7.1 publish for tui-textarea-2
* ci(release): automate publish, tag, and release after merge to main
---
.github/workflows/release-after-merge.yml | 103 ++++++++++++++++++++++
CHANGELOG.md | 12 ++-
Cargo.toml | 14 +--
README.md | 51 +++++------
bench/Cargo.toml | 2 +-
5 files changed, 150 insertions(+), 32 deletions(-)
create mode 100644 .github/workflows/release-after-merge.yml
diff --git a/.github/workflows/release-after-merge.yml b/.github/workflows/release-after-merge.yml
new file mode 100644
index 0000000..0ec8d79
--- /dev/null
+++ b/.github/workflows/release-after-merge.yml
@@ -0,0 +1,103 @@
+name: Release After Merge
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - Cargo.toml
+ - CHANGELOG.md
+ - bench/Cargo.toml
+ - .github/workflows/release-after-merge.yml
+ workflow_dispatch:
+
+permissions:
+ contents: write
+ id-token: write
+
+concurrency:
+ group: release-main
+ cancel-in-progress: false
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ environment: release
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - uses: dtolnay/rust-toolchain@stable
+
+ - uses: Swatinem/rust-cache@v2
+
+ - name: Read version and tag
+ id: meta
+ shell: bash
+ run: |
+ version="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
+ if [[ -z "$version" ]]; then
+ echo "Unable to parse version from Cargo.toml"
+ exit 1
+ fi
+ echo "version=$version" >> "$GITHUB_OUTPUT"
+ echo "tag=v$version" >> "$GITHUB_OUTPUT"
+
+ - name: Check whether tag already exists
+ id: tag
+ shell: bash
+ run: |
+ if git rev-parse -q --verify "refs/tags/${{ steps.meta.outputs.tag }}" >/dev/null; then
+ echo "exists=true" >> "$GITHUB_OUTPUT"
+ elif git ls-remote --exit-code --tags origin "refs/tags/${{ steps.meta.outputs.tag }}" >/dev/null 2>&1; then
+ echo "exists=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "exists=false" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Skip when already released
+ if: steps.tag.outputs.exists == 'true'
+ run: echo "Tag ${{ steps.meta.outputs.tag }} already exists. Nothing to release."
+
+ - name: Verify package
+ if: steps.tag.outputs.exists == 'false'
+ run: |
+ cargo package
+ cargo test
+
+ - name: Authenticate to crates.io (trusted publishing)
+ if: steps.tag.outputs.exists == 'false' && secrets.CARGO_REGISTRY_TOKEN == ''
+ id: crates_auth
+ uses: rust-lang/crates-io-auth-action@v1
+
+ - name: Publish with static token
+ if: steps.tag.outputs.exists == 'false' && secrets.CARGO_REGISTRY_TOKEN != ''
+ env:
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
+ run: cargo publish --locked --token "$CARGO_REGISTRY_TOKEN"
+
+ - name: Publish with trusted publishing token
+ if: steps.tag.outputs.exists == 'false' && secrets.CARGO_REGISTRY_TOKEN == ''
+ env:
+ CARGO_REGISTRY_TOKEN: ${{ steps.crates_auth.outputs.token }}
+ run: cargo publish --locked --token "$CARGO_REGISTRY_TOKEN"
+
+ - name: Create and push tag
+ if: steps.tag.outputs.exists == 'false'
+ shell: bash
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git tag -a "${{ steps.meta.outputs.tag }}" -m "${{ steps.meta.outputs.tag }}"
+ git push origin "${{ steps.meta.outputs.tag }}"
+
+ - name: Create GitHub release
+ if: steps.tag.outputs.exists == 'false'
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ gh release create "${{ steps.meta.outputs.tag }}" \
+ --repo "${{ github.repository }}" \
+ --verify-tag \
+ --generate-notes
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c029c00..be90e34 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+
+# [v0.7.1](https://github.com/srothgan/tui-textarea/releases/tag/v0.7.1) - 2026-02-18
+
+- Update compatibility for [ratatui](https://ratatui.rs/) v0.30.0.
+- Publish maintained fork under `srothgan/tui-textarea`.
+- Rename published crate to `tui-textarea-2`.
+- Add CI/collaboration baseline (workflows, templates, contributing guide).
+
+[Changes][v0.7.1]
+
# [v0.7.0](https://github.com/rhysd/tui-textarea/releases/tag/v0.7.0) - 2024-10-22
@@ -439,7 +449,7 @@ First release :tada:
[Changes][v0.1.0]
-
+[v0.7.1]: https://github.com/srothgan/tui-textarea/compare/v0.7.0...v0.7.1
[v0.7.0]: https://github.com/rhysd/tui-textarea/compare/v0.6.1...v0.7.0
[v0.6.1]: https://github.com/rhysd/tui-textarea/compare/v0.6.0...v0.6.1
[v0.6.0]: https://github.com/rhysd/tui-textarea/compare/v0.5.3...v0.6.0
diff --git a/Cargo.toml b/Cargo.toml
index bc867f6..284809e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,21 +1,25 @@
[package]
-name = "tui-textarea"
-version = "0.7.0"
+name = "tui-textarea-2"
+homepage = "https://github.com/srothgan/tui-textarea#readme"
+repository = "https://github.com/srothgan/tui-textarea"
+documentation = "https://docs.rs/tui-textarea-2/latest/tui_textarea/"
+version = "0.7.1"
edition = "2021"
rust-version = "1.56.1" # for `tui` crate support
-authors = ["rhysd "]
+authors = ["Simon Peter Rothgang ", "rhysd "]
description = """
tui-textarea is a simple yet powerful text editor widget for ratatui and tui-rs. Multi-line
text editor can be easily put as part of your TUI application.
"""
license = "MIT"
-homepage = "https://github.com/rhysd/tui-textarea#readme"
-repository = "https://github.com/rhysd/tui-textarea"
readme = "README.md"
categories = ["text-editors", "text-processing"]
keywords = ["tui", "textarea", "editor", "input", "ratatui"]
include = ["/src", "/examples", "/tests", "/README.md", "/LICENSE.txt"]
+[lib]
+name = "tui_textarea"
+
[features]
default = ["crossterm"]
# Features to use ratatui
diff --git a/README.md b/README.md
index 10e76e4..afb0182 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,15 @@
-tui-textarea
+tui-textarea-2
============
[![crate][crates-io-badge]][crate]
[![docs][doc-badge]][doc]
[![CI][ci-badge]][ci]
[![coverage][codecov-badge]][codecov]
-[tui-textarea][crate] is a simple yet powerful text editor widget like `