diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0e2b2dc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: build + +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + env: + GO111MODULE: "on" + steps: + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: ~1.17 + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Download Go modules + run: go mod download + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v -cover -timeout=30s ./... + + snapshot: + uses: charmbracelet/meta/.github/workflows/snapshot.yml@main + secrets: + goreleaser_key: ${{ secrets.GORELEASER_KEY }} \ No newline at end of file diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..a958106 --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,21 @@ +name: goreleaser + +on: + push: + tags: + - v*.*.* + +concurrency: + group: goreleaser + cancel-in-progress: true + +jobs: + goreleaser: + uses: charmbracelet/meta/.github/workflows/goreleaser.yml@main + secrets: + docker_username: ${{ secrets.DOCKERHUB_USERNAME }} + docker_token: ${{ secrets.DOCKERHUB_TOKEN }} + gh_pat: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + goreleaser_key: ${{ secrets.GORELEASER_KEY }} + aur_key: ${{ secrets.AUR_KEY }} + fury_token: ${{ secrets.FURY_TOKEN }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..28f61f7 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,14 @@ +name: nightly + +on: + push: + branches: + - main + +jobs: + nightly: + uses: charmbracelet/meta/.github/workflows/nightly.yml@main + secrets: + docker_username: ${{ secrets.DOCKERHUB_USERNAME }} + docker_token: ${{ secrets.DOCKERHUB_TOKEN }} + goreleaser_key: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/soft-serve.yml b/.github/workflows/soft-serve.yml new file mode 100644 index 0000000..b10a5c9 --- /dev/null +++ b/.github/workflows/soft-serve.yml @@ -0,0 +1,12 @@ +name: soft-serve + +on: + push: + branches: + - main + +jobs: + soft-serve: + uses: charmbracelet/meta/.github/workflows/soft-serve.yml@main + secrets: + ssh-key: "${{ secrets.CHARM_SOFT_SERVE_KEY }}" \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..6511a86 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,13 @@ +includes: + - from_url: + url: charmbracelet/meta/main/goreleaser.yaml + +variables: + main: "." + description: "Tasty Bubble Gum for your shell." + github_url: "https://github.com/charmbracelet/gum" + maintainer: "Maas Lalani " + brew_commit_author_name: "Maas Lalani" + brew_commit_author_email: "maas@charm.sh" + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6e0e54c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM gcr.io/distroless/static +COPY gum /usr/local/bin/gum +ENTRYPOINT [ "/usr/local/bin/gum" ] diff --git a/README.md b/README.md index 2a0faa8..ce83e76 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,46 @@ The following example is running from a [single Bash script](./examples/demo.sh) Shell running the Gum examples/demo.sh script +## Installation + +Use a package manager: + +```bash +# macOS or Linux +brew tap charmbracelet/tap && brew install charmbracelet/tap/gum + +# Arch Linux +pacman -S gum + +# Nix +nix-env -iA nixpkgs.gum + +# Debian/Ubuntu +echo 'deb [trusted=yes] https://repo.charm.sh/apt/ /' | sudo tee /etc/apt/sources.list.d/charm.list +sudo apt update && sudo apt install gum + +# Fedora +echo '[charm] +name=Charm +baseurl=https://repo.charm.sh/yum/ +enabled=1 +gpgcheck=0' | sudo tee /etc/yum.repos.d/charm.repo +sudo yum install gum +``` + +Or download it: + +* [Packages][releases] are available in Debian and RPM formats +* [Binaries][releases] are available for Linux, macOS, and Windows + +Or just install it with `go`: + +```bash +go install github.com/charmbracelet/gum@latest +``` + +[releases]: https://github.com/charmbracelet/gum/releases + ## Interaction #### Input