Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2a08a2c30 | ||
|
|
ac1e1f1ece |
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
# On push of a version tag (e.g. v1.0.0): build, create GitHub Release, upload JARs.
|
# On push of a version tag (e.g. v1.0.0): build, publish to GitHub Packages, create Release, upload JARs.
|
||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -8,10 +8,13 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RELEASE_VERSION: ${{ github.ref_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -23,7 +26,13 @@ jobs:
|
|||||||
java-version: 21
|
java-version: 21
|
||||||
cache: gradle
|
cache: gradle
|
||||||
|
|
||||||
- run: chmod +x gradlew && ./gradlew build --no-daemon
|
- name: Strip v from version
|
||||||
|
run: echo "RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build and publish to GitHub Packages
|
||||||
|
run: chmod +x gradlew && ./gradlew build publish --no-daemon
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
|||||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
|||||||
<component name="FrameworkDetectionExcludesConfiguration">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<file type="web" url="file://$PROJECT_DIR$" />
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="corretto-21" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="corretto-21" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
44
README.md
44
README.md
@@ -8,6 +8,50 @@ Java library for terminal UI: tables, rules, colors, prompts, menus, SelectList,
|
|||||||
|
|
||||||
[](https://codespaces.new/jakubbbdev/terminal-ui)
|
[](https://codespaces.new/jakubbbdev/terminal-ui)
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Published to [GitHub Packages](https://github.com/jakubbbdev/terminal-ui/packages). Replace `VERSION` with a [release](https://github.com/jakubbbdev/terminal-ui/releases) tag (e.g. `1.0.0`).
|
||||||
|
|
||||||
|
**Gradle (Kotlin DSL):**
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven { url = uri("https://maven.pkg.github.com/jakubbbdev/terminal-ui") }
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
implementation("dev.jakub.terminal:terminal-ui:VERSION")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Gradle (Groovy):**
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven { url "https://maven.pkg.github.com/jakubbbdev/terminal-ui" }
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
implementation "dev.jakub.terminal:terminal-ui:VERSION"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Maven:**
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<repository>
|
||||||
|
<id>github</id>
|
||||||
|
<url>https://maven.pkg.github.com/jakubbbdev/terminal-ui</url>
|
||||||
|
</repository>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.jakub.terminal</groupId>
|
||||||
|
<artifactId>terminal-ui</artifactId>
|
||||||
|
<version>VERSION</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
For public packages, read access usually works without credentials. If your tool asks for auth, use a [GitHub PAT](https://github.com/settings/tokens) with `read:packages` as username and the token as password.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- **Java 21**
|
- **Java 21**
|
||||||
|
|||||||
@@ -2,15 +2,15 @@ plugins {
|
|||||||
id("java")
|
id("java")
|
||||||
id("java-library")
|
id("java-library")
|
||||||
id("application")
|
id("application")
|
||||||
|
id("maven-publish")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<JavaExec>("run") {
|
tasks.named<JavaExec>("run") {
|
||||||
jvmArgs("-Ddev.jakub.terminal.ansi=true", "-Dfile.encoding=UTF-8")
|
jvmArgs("-Ddev.jakub.terminal.ansi=true", "-Dfile.encoding=UTF-8")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
group = "dev.jakub.terminal"
|
group = "dev.jakub.terminal"
|
||||||
version = "1.0-SNAPSHOT"
|
version = System.getenv("RELEASE_VERSION") ?: "1.0-SNAPSHOT"
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_21
|
sourceCompatibility = JavaVersion.VERSION_21
|
||||||
@@ -30,3 +30,24 @@ dependencies {
|
|||||||
tasks.test {
|
tasks.test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("maven") {
|
||||||
|
groupId = project.group.toString()
|
||||||
|
artifactId = "terminal-ui"
|
||||||
|
version = project.version.toString()
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "GitHubPackages"
|
||||||
|
url = uri("https://maven.pkg.github.com/jakubbbdev/terminal-ui")
|
||||||
|
credentials {
|
||||||
|
username = System.getenv("GITHUB_ACTOR") ?: project.findProperty("gpr.user")?.toString()
|
||||||
|
password = System.getenv("GITHUB_TOKEN") ?: project.findProperty("gpr.token")?.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user