Skip to content

Commit

Permalink
Add Git info to GitHub releases docs (closes #698)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 5, 2020
1 parent c0e69f5 commit be98df3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ When using an `SSH` url (such as `git@github.com:user/repo.git`), add the public

### HTTPS

When using an `HTTPS` url (such as `https://github.com/user/project.git`), things are slightly more complicated. Add the
token (e.g. `GITHUB_TOKEN`) to the CI/CD environment. Then make sure to add this token as a password in the origin url
before running release-it. E.g. add this to a .travis.yml` script section:
When using an `HTTPS` url (such as `https://github.com/user/project.git`), things are slightly more complicated. For
GitHub, add the `GITHUB_TOKEN` token to the CI/CD environment. Then make sure to add this token as a password in the
origin url before running release-it. An example is this `.travis.yml` section:

```yaml
script:
Expand All @@ -33,7 +33,7 @@ script:
- git symbolic-ref HEAD refs/heads/master
```

Replace `[user]` and `[project]` with the correct strings.
Replace `[user]` and `[project]` with the actual values.

## npm

Expand Down
11 changes: 6 additions & 5 deletions docs/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ Configure the `[git.*]` options to modify the commands accordingly. See

The minimum required version of Git is v2.0.0.

## SSH keys & Git remotes
## Git remotes

SSH keys and Git remotes are assumed to be configured correctly. If a manual `git push` from the command line works,
release-it should be able to do the same.

The following help pages might be useful:

- [SSH](https://help.github.com/articles/connecting-to-github-with-ssh/)
- [Managing Remotes](https://help.github.com/categories/managing-remotes/) (GitHub)
- [SSH keys](https://confluence.atlassian.com/bitbucket/ssh-keys-935365775.html) (Bitbucket)
- [SSH keys](https://gitlab.com/help/ssh/README.md) (GitLab)
- [Connecting to GitHub with SSH](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh)
- [Managing remote repositories](https://docs.github.com/en/github/using-git/managing-remote-repositories) (GitHub)
- [Configure SSH and two-step verification](https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/)
(Bitbucket)
- [GitLab and SSH keys](https://gitlab.com/help/ssh/README.md)

## Remote repository

Expand Down
6 changes: 6 additions & 0 deletions docs/github-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ To add [GitHub releases](https://help.github.com/articles/creating-releases/) in
Do not put the actual token in the release-it configuration. It will be read from the `GITHUB_TOKEN` environment
variable. You can change this variable name by setting the `github.tokenRef` option to something else.

## Git

A GitHub Release requires the corresponding Git tag to be present on the remote (release-it creates and pushes this tag
automatically). Thus, in addition to the `GITHUB_TOKEN`, a public SSH key is required to push the Git tag to the remote
repository. See [Git remotes](./git.md#git-remotes) (and [CI: Git](./ci.md#git)) for more information.

## Prerequisite checks

First, release-it will check whether the `GITHUB_TOKEN` environment variable is set. Otherwise it will throw an error
Expand Down
2 changes: 1 addition & 1 deletion docs/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For a pre-release, the default tag is "next". The tag will be derived from the p
A [scoped package](https://docs.npmjs.com/about-scopes) (e.g. `@user/package`) is either public or private. By default,
`npm publish` will publish a scoped package as private. Note that scoped packages require a paid account.

In order to publish a scoped package to the public registry, specify this in `package.json`:
In order to publish a scoped package to the public registry, specify this at the root of `package.json`:

```json
{
Expand Down

0 comments on commit be98df3

Please sign in to comment.