{"id":15497508,"url":"https://github.com/bcomnes/releasearoni","last_synced_at":"2026-04-09T18:17:54.499Z","repository":{"id":191765321,"uuid":"685605764","full_name":"bcomnes/releasearoni","owner":"bcomnes","description":"A modernized node-centric releaser tool with built in auto-changelog","archived":false,"fork":false,"pushed_at":"2026-03-31T01:57:46.000Z","size":104,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-31T04:12:16.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/bcomnes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/funding.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["bcomnes"],"custom":["https://bret.io"]}},"created_at":"2023-08-31T15:51:23.000Z","updated_at":"2026-03-31T01:57:50.000Z","dependencies_parsed_at":"2026-03-31T03:07:17.030Z","dependency_job_id":null,"html_url":"https://github.com/bcomnes/releasearoni","commit_stats":null,"previous_names":["bcomnes/releasearoni"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/bcomnes/releasearoni","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Freleasearoni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Freleasearoni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Freleasearoni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Freleasearoni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcomnes","download_url":"https://codeload.github.com/bcomnes/releasearoni/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Freleasearoni/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31314352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-02T08:39:03.225Z","updated_at":"2026-04-09T18:17:54.491Z","avatar_url":"https://github.com/bcomnes.png","language":"JavaScript","funding_links":["https://github.com/sponsors/bcomnes","https://bret.io"],"categories":[],"sub_categories":[],"readme":"# releasearoni\n[![latest version](https://img.shields.io/npm/v/releasearoni.svg)](https://www.npmjs.com/package/releasearoni)\n[![Actions Status](https://github.com/bcomnes/releasearoni/workflows/tests/badge.svg)](https://github.com/bcomnes/releasearoni/actions)\n[![downloads](https://img.shields.io/npm/dm/releasearoni.svg)](https://npmtrends.com/releasearoni)\n![Types in JS](https://img.shields.io/badge/types_in_js-yes-brightgreen)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-7fffff?style=flat\u0026labelColor=ff80ff)](https://github.com/neostandard/neostandard)\n[![Socket Badge](https://socket.dev/api/badge/npm/package/releasearoni)](https://socket.dev/npm/package/releasearoni)\n\n\u003cimg width=\"256\" height=\"256\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1426b820-6ba0-4387-8e66-a819c07855df\" /\u003e\n\nPublish GitHub releases from the command line or Node.js. Reads defaults from `package.json` and `CHANGELOG.md` (keepachangelog format) so you rarely need to pass any flags. Ships two bins: `releasearoni` uses the GitHub API directly via `@octokit/rest`, and `releasearoni-gh` is a thin wrapper around the `gh` CLI.\n\n```console\nnpm install releasearoni\n```\n\n## CLI\n\nBoth bins share the same flags and read the same defaults. Run either from a directory that contains `package.json` and `CHANGELOG.md`.\n\n### `releasearoni`\n\nUses `@octokit/rest` + `ghauth` for authentication. No `gh` CLI required.\n\n```console\nUsage: releasearoni [options]\n\n    Example: releasearoni\n\n    --tag-name, -t        Tag for this release\n    --target-commitish, -c Commitish value for tag\n    --name, -n            Release title\n    --body, -b            Release body text\n    --owner, -o           Repo owner\n    --repo, -r            Repo name\n    --draft, -d           Publish as draft (default: false)\n    --prerelease, -p      Publish as prerelease (default: false)\n    --workpath, -w        Path to working directory (default: cwd)\n    --endpoint, -e        GitHub API endpoint URL (default: https://api.github.com)\n    --assets, -a          Comma-delimited list of assets to upload\n    --dry-run             Preview release without creating it (default: false)\n    --no-upsert           Fail if a release for this tag already exists (default: false)\n    --prompt              Prompt for confirmation before publishing (default: false)\n    --no-npm-check        Skip npm auth check before publishing (default: false)\n    --no-push             Skip git push --follow-tags before publishing (default: false)\n    --no-build            Skip npm run build even if a build script is present (default: false)\n    --help, -h            Show help\n    --version, -v         Show version\n\nreleasearoni (v0.0.0)\n```\n\n### `releasearoni-gh`\n\nDelegates to `gh release create`. Requires the [gh CLI](https://cli.github.com) to be installed and authenticated.\n\n```console\nUsage: releasearoni-gh [options]\n\n    Example: releasearoni-gh\n\n    --tag-name, -t        Tag for this release\n    --target-commitish, -c Commitish value for tag\n    --name, -n            Release title\n    --body, -b            Release body text\n    --owner, -o           Repo owner\n    --repo, -r            Repo name\n    --draft, -d           Publish as draft (default: false)\n    --prerelease, -p      Publish as prerelease (default: false)\n    --workpath, -w        Path to working directory (default: cwd)\n    --endpoint, -e        GitHub API endpoint URL (default: https://api.github.com)\n    --assets, -a          Comma-delimited list of assets to upload\n    --dry-run             Preview release without creating it (default: false)\n    --no-upsert           Fail if a release for this tag already exists (default: false)\n    --prompt              Prompt for confirmation before publishing (default: false)\n    --no-npm-check        Skip npm auth check before publishing (default: false)\n    --no-push             Skip git push --follow-tags before publishing (default: false)\n    --no-build            Skip npm run build even if a build script is present (default: false)\n    --help, -h            Show help\n    --version, -v         Show version\n\nreleasearoni-gh (v0.0.0)\n```\n\n### Defaults\n\nBoth bins derive release defaults automatically:\n\n| Field | Default source |\n|---|---|\n| `tag_name` | `v` + `version` from `package.json` |\n| `name` | Same as `tag_name` |\n| `body` | Latest versioned entry from `CHANGELOG.md` |\n| `target_commitish` | Current `HEAD` commit SHA (`git rev-parse HEAD`) |\n| `owner` / `repo` | Parsed from `repository` field in `package.json` |\n| `draft` | `false` |\n| `prerelease` | `false` |\n| `endpoint` | `https://api.github.com` |\n\nThe `CHANGELOG.md` must be in [keepachangelog](https://keepachangelog.com) format. Releases are blocked if an `[Unreleased]` section contains content.\n\nIf a release for the tag already exists (e.g. when re-running a failed publish), both bins will update the existing release in place rather than failing. Pass `--no-upsert` to get a hard failure instead, which is useful for enforcing that a tag is never accidentally re-released.\n\n### `releasearoni npm-check`\n\nChecks whether you are logged in to npm. If not logged in and the `CI` environment variable is not set, runs `npm login` interactively. In CI, exits non-zero with an actionable error if not authenticated. Designed to run at the top of a `prepublishOnly` script so login issues are caught before any build, push, or release work has started.\n\n```console\nUsage: releasearoni npm-check\n```\n\nTypical `package.json` setup:\n\n```json\n{\n  \"scripts\": {\n    \"prepublishOnly\": \"releasearoni\"\n  }\n}\n```\n\n### `releasearoni version`\n\nGenerates `CHANGELOG.md` via [auto-changelog](https://github.com/CookPete/auto-changelog) and stages it with `git add`. Designed for use as the npm [`version` lifecycle script](https://docs.npmjs.com/cli/v10/using-npm/scripts#life-cycle-scripts).\n\n```console\nUsage: releasearoni version [options]\n\n    --changelog, -c       Changelog file to generate and stage (default: CHANGELOG.md)\n    --add, -a             Additional files to stage after changelog (repeatable)\n    --breaking-pattern    Regex for breaking changes (default: 'BREAKING CHANGE:')\n    --template            auto-changelog template (default: keepachangelog)\n    --workpath, -w        Working directory (default: cwd)\n    --help, -h            Show help\n```\n\nTypical `package.json` setup — no separate `auto-changelog` install needed:\n\n```json\n{\n  \"scripts\": {\n    \"version\": \"releasearoni version\",\n    \"prepublishOnly\": \"releasearoni\"\n  }\n}\n```\n\nRun `npm version patch` (or `minor`/`major`) and npm will:\n1. Bump the version in `package.json`\n2. Run `releasearoni version` → regenerates `CHANGELOG.md` and stages it\n3. Commit and tag\n\nThen `npm publish` triggers `prepublishOnly`, which checks npm auth, pushes the tag, and creates the GitHub release.\n\nTo stage extra files (e.g. a lock file your project manages separately):\n\n```json\n\"version\": \"releasearoni version --add package-lock.json\"\n```\n\n## Example setup\n\nA complete `package.json` wired up for versioning and publishing via GitHub Actions:\n\n```jsonc\n{\n  \"name\": \"my-package\",\n  \"version\": \"1.0.0\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/my-org/my-package.git\"\n  },\n  \"scripts\": {\n    // Runs during `npm version`: regenerates CHANGELOG.md and stages it\n    // Use --add to stage additional files that should be part of the version commit\n    \"version\": \"releasearoni version --add dist/manifest.json --add src/generated/version.js\",\n    // Runs before `npm publish`:\n    //   1. checks npm login / OIDC status\n    //   2. runs `npm run build` if a build script is present\n    //   3. pushes the version commit + tag to GitHub\n    //   4. creates the GitHub release\n    // Use releasearoni-gh instead if you prefer the gh CLI.\n    \"prepublishOnly\": \"releasearoni\",\n    // Clean up build artifacts after npm has published them\n    \"postpublish\": \"npm run clean\"\n  },\n  \"devDependencies\": {\n    \"releasearoni\": \"^0.1.0\"\n  }\n}\n```\n\n`releasearoni` and `releasearoni-gh` are interchangeable in the scripts above — swap in `releasearoni-gh` if you prefer to delegate to the `gh` CLI.\n\nA matching GitHub Actions workflow that triggers on manual dispatch:\n\n```yaml\n# .github/workflows/release.yml\nname: npm bump\n\non:\n  workflow_dispatch:\n    inputs:\n      version_type:\n        description: 'Version type'\n        type: choice\n        options: [major, minor, patch]\n        default: patch\n        required: true\n\npermissions:\n  contents: write # required to push the version commit, tag, and create the GitHub release\n  id-token: write # required for OIDC publishing to npm (provenance)\n\njobs:\n  version_and_release:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          fetch-depth: 0 # fetch full history so things like auto-changelog work properly\n      - uses: actions/setup-node@v6\n        with:\n          node-version-file: package.json\n      - run: npm install\n      - run: npm test\n      - name: Configure git author\n        run: |\n          git config user.name \"${{ github.actor }}\"\n          git config user.email \"${{ github.actor }}@users.noreply.github.com\"\n      - name: npm version\n        run: npm version \"${{ github.event.inputs.version_type }}\"\n      - name: npm publish\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # used by releasearoni to create the GitHub release\n        run: npm publish\n```\n\n`npm version` runs the `version` lifecycle script (changelog + commit + tag), then `npm publish` triggers `prepublishOnly` which pushes the tag and creates the GitHub release.\n\n### Environment variables (`releasearoni` only)\n\nAuthentication for the direct API bin is resolved in this order:\n\n- `GH_TOKEN`\n- `GITHUB_TOKEN`\n- Interactive [GitHub device flow](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#device-flow) via `ghauth` — opens a browser prompt, stores the token in the OS keychain for future runs. Press \u003ckbd\u003eEnter\u003c/kbd\u003e at the device flow prompt to fall back to pasting a personal access token instead.\n\n## API\n\n### `import { createRelease } from 'releasearoni'`\n\nProgrammatic release creation using `@octokit/rest`.\n\n### `release = await createRelease(options)`\n\nCreate a GitHub release. Reads `package.json` and `CHANGELOG.md` from `workpath` to fill in defaults, then calls the GitHub Releases API.\n\n```js\nimport { createRelease } from 'releasearoni'\n\nconst release = await createRelease({\n  auth: { token: process.env.GITHUB_TOKEN },\n  workpath: process.cwd(), // optional, defaults to cwd\n})\n\nconsole.log(release.html_url)\n```\n\nOptions:\n\n| Option | Type | Description |\n|---|---|---|\n| `auth` | `{ token: string }` | **Required.** GitHub API token. |\n| `workpath` | `string` | Path to directory with `package.json` and `CHANGELOG.md`. Default: `cwd`. |\n| `owner` | `string` | Repo owner. Default: parsed from `package.json`. |\n| `repo` | `string` | Repo name. Default: parsed from `package.json`. |\n| `tag_name` | `string` | Tag to create. Default: `v` + package version. |\n| `target_commitish` | `string` | Branch or SHA for the tag. Default: current `HEAD`. |\n| `name` | `string` | Release title. Default: same as `tag_name`. |\n| `body` | `string` | Release body. Default: latest CHANGELOG entry. |\n| `draft` | `boolean` | Publish as draft. Default: `false`. |\n| `prerelease` | `boolean` | Mark as prerelease. Default: `false`. |\n| `endpoint` | `string` | GitHub API base URL. Default: `https://api.github.com`. |\n| `assets` | `string[] \\| {name, path}[]` | Files to upload as release assets. |\n| `upsert` | `boolean` | Update existing release if tag already exists. Default: `true`. Pass `false` to fail instead. |\n\nReturns the GitHub release object from the API response.\n\n## See also\n\n- [gh-release](https://github.com/bcomnes/gh-release) — the original CLI this was forked from\n- [gh CLI](https://cli.github.com) — official GitHub CLI used by `releasearoni-gh`\n- [keepachangelog](https://keepachangelog.com) — CHANGELOG format expected by releasearoni\n- [ghauth](https://github.com/nicolo-ribaudo/ghauth) — OAuth token management used by `releasearoni`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcomnes%2Freleasearoni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcomnes%2Freleasearoni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcomnes%2Freleasearoni/lists"}