diff --git a/.github/build.yml b/.github/build.yml new file mode 100644 index 0000000..7c25a51 --- /dev/null +++ b/.github/build.yml @@ -0,0 +1,25 @@ +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - name: Install dependencies + run: | + go mod download + curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh + - name: Test + run: | + go build + ./bin/goreleaser check \ No newline at end of file diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..f3a9d21 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - '*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GA_GORELEASER_TOKEN }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..1ac0ab4 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,41 @@ +project_name: confetty + +before: + hooks: + - go mod download + +release: + github: + owner: maaslalani + name: confetty + +builds: + - main: ./main.go + binary: confetty + goos: + - windows + - darwin + - linux + goarch: + - amd64 + - arm64 + +brews: + - tap: + owner: maaslalani + name: homebrew-tap + folder: Formula + homepage: https://github.com/maaslalani/confetty + description: Confetti in your TTY + license: MIT + +nfpms: + - id: confetty + package_name: confetty + homepage: https://github.com/maaslalani/confetty + description: Confetti in your TTY + license: MIT + formats: + - apk + - deb + - rpm \ No newline at end of file diff --git a/README.md b/README.md index 8e583eb..dc444db 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # ConfeTTY -https://user-images.githubusercontent.com/42545625/128612977-5d6e0321-9584-48b5-8ff8-dd5b811211d3.mov + +![build workflow](https://github.com/maaslalani/confetty/actions/workflows/build.yml/badge.svg) + + Confetti (or fireworks) inside your terminal. -### Preview +## Preview You can quickly preview `confetty` through `ssh` (thanks to [charmbracelet/wish](https://github.com/charmbracelet/wish)) @@ -14,25 +17,49 @@ ssh -p 2222 ssh.caarlos0.dev ssh -p 2223 ssh.caarlos0.dev ``` -### Installation +## Installation -``` +### Using go toolchain + +```bash go install github.com/maaslalani/confetty ``` -### Usage +### Using homebrew +```bash +brew install maaslalani/tap/confetty ``` + +### Using yum + +```bash +yum install -y <> +``` + +### Using apt + +```bash +apt install -y <> +``` + +### Other platforms + +Head over to the [releases section](https://github.com/maaslalani/confetty/releases) and download the binary for your platform. + +## Usage + +```bash confetty ``` -``` +```bash confetty fireworks ``` Press any key to cause more confetti / fireworks to appear. -Ctrl-C or q to exit. +`Ctrl-C` or `q` to exit. -#### Why? +## Why? ¯\\\_(ツ)\_/¯