Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zcong1993/git-release
Generate github release with changelog in a single command
https://github.com/zcong1993/git-release
github golang release
Last synced: about 22 hours ago
JSON representation
Generate github release with changelog in a single command
- Host: GitHub
- URL: https://github.com/zcong1993/git-release
- Owner: zcong1993
- License: mit
- Created: 2017-06-14T08:32:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-20T08:13:14.000Z (over 7 years ago)
- Last Synced: 2024-06-20T17:45:49.796Z (5 months ago)
- Topics: github, golang, release
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-release
[![Go Report Card](https://goreportcard.com/badge/github.com/zcong1993/git-release)](https://goreportcard.com/report/github.com/zcong1993/git-release)
[![Build Status](https://travis-ci.org/zcong1993/git-release.svg?branch=master)](https://travis-ci.org/zcong1993/git-release)> Generate github release with changelog in a single command, like [this](https://github.com/zcong1993/git-release/releases)
Based on [tcnksm/ghr](https://github.com/tcnksm/ghr)
## Install
Download binary from [release](https://github.com/zcong1993/git-release/releases) page and place it in `$PATH` directory.Or build yourself
```bash
$ go get -v -u github.com/zcong1993/git-release
$ cd $GOPATH/github.com/zcong1993/git-release
$ make build
# then place ./bin/rls in `$PATH` directory.
```## Usage
```bash
$ rls [option] TAG
```
`TAG` is required. TAG is the release tag. And must config github api token first.### GitHub API Token
To get token, first, visit GitHub account settings page, then go to Applications for the user. Here you can create a token in the Personal access tokens section. For a private repository you need repo scope and for a public repository you need public_repo scope.
When using ghr, you can set it via GITHUB_TOKEN env var, -token command line option or github.token property in .gitconfig file.
For instance, to set it via environmental variable:
```bash
$ export GITHUB_TOKEN="....."
```
Or set it in github.token in gitconfig:```bash
$ git config --global github.token "....."
```
Note that environmental variable takes priority over gitconfig value.### GitHub Enterprise
You can use ghr for GitHub Enterprise. Change API endpoint via the enviromental variable.
```bash
$ export GITHUB_API=http://github.company.com/api/v3/
```### Options
```bash
$ rls \
-t TOKEN \ # Set Github API Token
-u USERNAME \ # Set Github username
-r REPO \ # Set repository name
-c COMMIT \ # Set target commitish, branch or commit SHA
-delete \ # Delete release and its git tag in advance if it exists
-draft \ # Release as draft (Unpublish)
-prerelease \ # Crate prerelease
TAG
```## License
MIT © zcong1993