diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3d63f0..4b46a5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,6 @@ on: pull_request: branches: [ main, master ] -# Alte Läufe abbrechen, wenn ein neuer Push kommt (spart Zeit) concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index d6f6f60..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,42 +0,0 @@ -# CodeQL: static security analysis (free for public repos). -name: CodeQL - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - schedule: - - cron: '0 6 * * 1' - -jobs: - analyze: - runs-on: ubuntu-latest - permissions: - security-events: write - actions: read - contents: read - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 21 - cache: gradle - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: java - - - name: Build (for CodeQL) - run: | - chmod +x gradlew - ./gradlew compileJava --no-daemon - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..6c43f0e --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,53 @@ +# Deploy docs to GitHub Pages (optional) +# Enable in repo: Settings → Pages → Source: GitHub Actions +# Site will be at https://jakubbbdev.github.io/terminal-ui/ + +name: Pages + +on: + push: + branches: [master, main] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + deploy: + runs-on: ubuntu-latest + environment: github-pages + steps: + - uses: actions/checkout@v4 + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Build site + run: | + mkdir -p _site + cp -r docs _site/ + cat > _site/index.html << 'EOF' + + terminal-ui + +

terminal-ui

+

Java library for terminal UIs: tables, prompts, menus, and more.

+ + + EOF + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _site + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69bced5..ee16075 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,10 +29,15 @@ jobs: - 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 + - name: Build + run: chmod +x gradlew && ./gradlew build --no-daemon + + - name: Publish to GitHub Packages + run: ./gradlew publish --no-daemon env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: true + # 409 = version already exists; use a new tag (e.g. v1.0.2) next time - name: Create Release uses: softprops/action-gh-release@v2 diff --git a/.idea/misc.xml b/.idea/misc.xml index 32cf4db..d799c3d 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9247b05 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,17 @@ +# Code of Conduct + +## Our Pledge + +We are committed to providing a welcoming and harassment-free experience for everyone. Be respectful, inclusive, and constructive when contributing or discussing this project. + +## Unacceptable Behavior + +Harassment, trolling, insulting comments, personal or political attacks, and other conduct that could make others feel unsafe are not acceptable. + +## Enforcement + +Maintainers may remove or edit content that violates this code. Repeated or serious violations may result in being blocked from the repository. + +## Contact + +If you have concerns, open an issue or contact the maintainers privately if preferred. diff --git a/FUNDING.yml b/FUNDING.yml new file mode 100644 index 0000000..68190d8 --- /dev/null +++ b/FUNDING.yml @@ -0,0 +1,5 @@ +# Optional: Uncomment to show "Sponsor" button on the repo +# github: [jakubbbdev] +# patreon: your-username +# ko_fi: your-username +# custom: ['https://your-link.com'] diff --git a/README.md b/README.md index bd07952..d1b6143 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,12 @@ Java library for terminal UI: tables, rules, colors, prompts, menus, SelectList, [![CI](https://github.com/jakubbbdev/terminal-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/jakubbbdev/terminal-ui/actions/workflows/ci.yml) [![Java 21](https://img.shields.io/badge/Java-21-ED8B00?logo=openjdk)](https://openjdk.org/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) +[![Latest release](https://img.shields.io/github/v/release/jakubbbdev/terminal-ui)](https://github.com/jakubbbdev/terminal-ui/releases) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/jakubbbdev/terminal-ui) +**First time here?** → [NEXT_STEPS.md](NEXT_STEPS.md) has a short checklist (Pages, topics, release). + ## 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`). @@ -95,6 +98,12 @@ String choice = Terminal.menu() .select(); ``` +## Docs & links + +- **In-repo docs:** [docs/](docs/) – Home, Install, Components, Examples. +- **GitHub Pages:** Enable in **Settings → Pages → Source: GitHub Actions** (uses workflow `pages.yml`). Site: `https://jakubbbdev.github.io/terminal-ui/`. +- **Wiki:** **Settings → Features** → enable **Wiki**; copy content from `docs/` if you like. + ## License See [LICENSE](LICENSE).