{"id":15046189,"url":"https://github.com/k1low/gh-setup","last_synced_at":"2025-10-08T12:59:34.994Z","repository":{"id":65831411,"uuid":"600697415","full_name":"k1LoW/gh-setup","owner":"k1LoW","description":":octocat: Setup asset of Github releases.","archived":false,"fork":false,"pushed_at":"2024-12-12T02:40:07.000Z","size":231,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T16:52:49.873Z","etag":null,"topics":["gh-extension","github-actions","github-releases"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k1LoW.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"k1LoW","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2023-02-12T09:59:55.000Z","updated_at":"2024-12-12T02:39:54.000Z","dependencies_parsed_at":"2024-01-08T23:44:54.111Z","dependency_job_id":"9dc4d3f9-c7e7-40c0-badb-1bfaf3fc44e0","html_url":"https://github.com/k1LoW/gh-setup","commit_stats":{"total_commits":225,"total_committers":5,"mean_commits":45.0,"dds":"0.42666666666666664","last_synced_commit":"fd42beb43bf43f6a62c0fb0191c067ad61968039"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgh-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgh-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgh-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgh-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k1LoW","download_url":"https://codeload.github.com/k1LoW/gh-setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238284833,"owners_count":19446738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gh-extension","github-actions","github-releases"],"created_at":"2024-09-24T20:52:49.699Z","updated_at":"2025-10-08T12:59:34.989Z","avatar_url":"https://github.com/k1LoW.png","language":"Go","readme":"# gh-setup\n\n:octocat: Setup asset of Github Releases.\n\n[![build](https://github.com/k1LoW/gh-setup/actions/workflows/ci.yml/badge.svg)](https://github.com/k1LoW/gh-setup/actions/workflows/ci.yml) ![Coverage](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/gh-setup/coverage.svg) ![Code to Test Ratio](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/gh-setup/ratio.svg)\n\nKey features of `gh-setup` are:\n\n- **For setup, detect the version, the appropriate GitHub Releases asset, the asset's compressed format, and the executable path where the binary will be installed.**\n- **Works as a GitHub CLI extension (or a standalone CLI) as well as a GitHub Action.**\n- **Could be used as a part to create a GitHub Action like `setup-*`.**\n\n## As a GitHub CLI extension\n\n### Usage\n\n``` console\n$ gh setup --repo k1LoW/tbls\nUse tbls_v1.62.0_darwin_arm64.zip\nSetup binaries to executable path (PATH):\n  tbls -\u003e /Users/k1low/local/bin/tbls\n$ tbls version\n1.62.0\n```\n\n### Install\n\n``` console\n$ gh extension install k1LoW/gh-setup\n```\n\n## As a GitHub Action\n\n### Usage\n\n``` yaml\n# .github/workflows/doc.yml\n[...]\n    steps:\n      -\n        name: Setup k1LoW/tbls\n        uses: k1LoW/gh-setup@v1\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          repo: k1LoW/tbls\n        # version: v1.60.0\n        # os: linux\n        # arch: amd64\n        # bin-match: tbls\n        # checksum: f1ee97bbf22d5324ec2b468d83f43088d9e5c61deb77fafc220b297e03d47574\n        # force: true\n        # strict: true\n        # verify-attestation: true\n        # attestation-flags: \"--owner=k1LoW\"\n        # gh-setup-version: latest\n      -\n        name: Run tbls\n        run: tbls doc\n```\n\n## As a part to create a GitHub Action like `setup-*`\n\nSee https://github.com/k1LoW/setup-tbls\n\n``` yaml\n# action.yml\nname: 'Setup tbls'\ndescription: 'GitHub Action for tbls, a CI-Friendly tool for document a database, written in Go.'\nbranding:\n  icon: 'box'\n  color: 'blue'\ninputs:\n  github-token:\n    description: The GitHub token\n    default: ${{ github.token }}\n    required: false\n  version:\n    description: Version of tbls\n    default: latest\n    required: false\n  force:\n    description: Enable force setup\n    default: ''\n    required: false\n  checksum:\n    description: Checksum of tbls\n    default: ''\n    required: false\nruns:\n  using: 'composite'\n  steps:\n    -\n      uses: k1LoW/gh-setup@v1\n      with:\n        repo: github.com/k1LoW/tbls\n        github-token: ${{ inputs.github-token }}\n        version: ${{ inputs.version }}\n        bin-match: tbls\n        checksum: ${{ inputs.checksum }}\n        force: ${{ inputs.force }}\n```\n\n## As a Standalone CLI\n\n### Usage\n\nRun `gh-setup` instead of `gh setup`.\n\n``` console\n$ gh-setup --repo k1LoW/tbls\nUse tbls_v1.62.0_darwin_arm64.zip\nSetup binaries to executable path (PATH):\n  tbls -\u003e /Users/k1low/local/bin/tbls\n$ tbls version\n1.62.0\n```\n\n### Install\n\n**deb:**\n\n``` console\n$ export GH_SETUP_VERSION=X.X.X\n$ curl -o gh-setup.deb -L https://github.com/k1LoW/gh-setup/releases/download/v$GH_SETUP_VERSION/gh-setup_$GH_SETUP_VERSION-1_amd64.deb\n$ dpkg -i gh-setup.deb\n```\n\n**RPM:**\n\n``` console\n$ export GH_SETUP_VERSION=X.X.X\n$ yum install https://github.com/k1LoW/gh-setup/releases/download/v$GH_SETUP_VERSION/gh-setup_$GH_SETUP_VERSION-1_amd64.rpm\n```\n\n**apk:**\n\n``` console\n$ export GH_SETUP_VERSION=X.X.X\n$ curl -o gh-setup.apk -L https://github.com/k1LoW/gh-setup/releases/download/v$GH_SETUP_VERSION/gh-setup_$GH_SETUP_VERSION-1_amd64.apk\n$ apk add gh-setup.apk\n```\n\n**homebrew tap:**\n\n```console\n$ brew install k1LoW/tap/gh-setup\n```\n\n**[aqua](https://aquaproj.github.io/):**\n\n```console\n$ aqua g -i k1LoW/gh-setup\n```\n\n**manually:**\n\nDownload binary from [releases page](https://github.com/k1LoW/gh-setup/releases)\n\n**go install:**\n\n```console\n$ go install github.com/k1LoW/gh-setup/cmd/gh-setup@latest\n```\n\n**docker:**\n\n```console\n$ docker pull ghcr.io/k1low/gh-setup:latest\n```\n\n## Attestation Verification\n\ngh-setup supports verifying attestations using the `gh attestation verify` command. To enable attestation verification, use the `--verify-attestation` flag. You can also pass additional flags to the `gh attestation verify` command using the `--attestation-flags` flag.\n\nExample:\n\n```console\n$ gh setup --repo k1LoW/tbls --verify-attestation --attestation-flags \"--owner=k1LoW\"\n```\n\nIn GitHub Actions:\n\n```yaml\n- name: Setup k1LoW/tbls\n  uses: k1LoW/gh-setup@v1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    repo: k1LoW/tbls\n    verify-attestation: true\n    attestation-flags: \"--owner=k1LoW\"\n```\n\nThis feature requires the `gh` CLI with the attestation extension to be installed.\n","funding_links":["https://github.com/sponsors/k1LoW"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1low%2Fgh-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk1low%2Fgh-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1low%2Fgh-setup/lists"}