|
1 | | -# @simple-release/github-release |
| 1 | +# @simple-release/github |
2 | 2 |
|
3 | 3 | [![ESM-only package][package]][package-url] |
4 | 4 | [![NPM version][npm]][npm-url] |
|
11 | 11 | [package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg |
12 | 12 | [package-url]: https://nodejs.org/api/esm.html |
13 | 13 |
|
14 | | -[npm]: https://img.shields.io/npm/v/@simple-release/github-release.svg |
15 | | -[npm-url]: https://www.npmjs.com/package/@simple-release/github-release |
| 14 | +[npm]: https://img.shields.io/npm/v/@simple-release/github.svg |
| 15 | +[npm-url]: https://www.npmjs.com/package/@simple-release/github |
16 | 16 |
|
17 | | -[node]: https://img.shields.io/node/v/@simple-release/github-release.svg |
| 17 | +[node]: https://img.shields.io/node/v/@simple-release/github.svg |
18 | 18 | [node-url]: https://nodejs.org |
19 | 19 |
|
20 | | -[deps]: https://img.shields.io/librariesio/release/npm/@simple-release/github-release |
21 | | -[deps-url]: https://libraries.io/npm/@simple-release%2Fcore/tree |
| 20 | +[deps]: https://img.shields.io/librariesio/release/npm/@simple-release/github |
| 21 | +[deps-url]: https://libraries.io/npm/@simple-release%2Fgithub/tree |
22 | 22 |
|
23 | | -[size]: https://packagephobia.com/badge?p=@simple-release/github-release |
24 | | -[size-url]: https://packagephobia.com/result?p=@simple-release/github-release |
| 23 | +[size]: https://packagephobia.com/badge?p=@simple-release/github |
| 24 | +[size-url]: https://packagephobia.com/result?p=@simple-release/github |
25 | 25 |
|
26 | 26 | [build]: https://img.shields.io/github/actions/workflow/status/TrigenSoftware/simple-release/tests.yml?branch=main |
27 | 27 | [build-url]: https://github.com/TrigenSoftware/simple-release/actions |
28 | 28 |
|
29 | 29 | [coverage]: https://coveralls.io/repos/github/TrigenSoftware/simple-release/badge.svg?branch=main |
30 | 30 | [coverage-url]: https://coveralls.io/github/TrigenSoftware/simple-release?branch=main |
31 | 31 |
|
32 | | -A github release addon for simple-release. |
| 32 | +A github addon for simple-release. |
33 | 33 |
|
34 | 34 | ## Install |
35 | 35 |
|
36 | 36 | ```bash |
37 | 37 | # pnpm |
38 | | -pnpm add @simple-release/github-release |
| 38 | +pnpm add @simple-release/github |
39 | 39 | # yarn |
40 | | -yarn add @simple-release/github-release |
| 40 | +yarn add @simple-release/github |
41 | 41 | # npm |
42 | | -npm i @simple-release/github-release |
| 42 | +npm i @simple-release/github |
43 | 43 | ``` |
44 | 44 |
|
45 | 45 | ## Usage |
46 | 46 |
|
47 | 47 | ```js |
48 | 48 | import { Releaser } from '@simple-release/core' |
49 | 49 | import { PnpmProject } from '@simple-release/pnpm' |
50 | | -import { GithubReleaseCreator } from '@simple-release/github-release' |
| 50 | +import { GithubHosting } from '@simple-release/github' |
51 | 51 |
|
52 | | -const project = new PnpmProject() |
53 | | - |
54 | | -await new Releaser(project) |
| 52 | +await new Releaser({ |
| 53 | + project: new PnpmProject(), |
| 54 | + hosting: new GithubHosting({ |
| 55 | + token: process.env.GITHUB_TOKEN |
| 56 | + }) |
| 57 | +}) |
55 | 58 | .bump() |
56 | 59 | .commit() |
57 | 60 | .tag() |
58 | 61 | .push() |
59 | 62 | .publish() |
60 | | - .release(new GithubReleaseCreator({ |
61 | | - token: process.env.GITHUB_TOKEN |
62 | | - })) |
| 63 | + .release() |
63 | 64 | .run() |
64 | 65 | ``` |
65 | 66 |
|
66 | 67 | ## Options |
67 | 68 |
|
68 | | -### `token` |
69 | | - |
70 | | -The GitHub personal access token to authenticate with the GitHub API. |
71 | | - |
72 | | -### `owner` |
73 | | - |
74 | | -The GitHub owner (username or organization) of the repository. If not provided, it will be inferred from the remote URL. |
75 | | - |
76 | | -### `project` |
77 | | - |
78 | | -The GitHub project (repository name) to create releases in. If not provided, it will be inferred from the remote URL. |
| 69 | +| Option | Description | |
| 70 | +|--------|-------------| |
| 71 | +| token | GitHub personal access token to authenticate with the GitHub API. | |
| 72 | +| octokit | Alternative to `token`, you can provide an instance of GitHub's Octokit client. | |
| 73 | +| owner | The GitHub owner (username or organization) of the repository. If not provided, it will be inferred from the remote URL. | |
| 74 | +| project | The GitHub project (repository name) to create releases in. If not provided, it will be inferred from the remote URL. | |
0 commit comments