Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shiimaxx/glr
CLI tool for creating GitLab Release
https://github.com/shiimaxx/glr
gitlab golang release
Last synced: 3 months ago
JSON representation
CLI tool for creating GitLab Release
- Host: GitHub
- URL: https://github.com/shiimaxx/glr
- Owner: shiimaxx
- License: mit
- Created: 2020-05-07T02:43:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-16T08:33:44.000Z (4 months ago)
- Last Synced: 2024-07-16T11:04:07.338Z (4 months ago)
- Topics: gitlab, golang, release
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# glr
`glr` is a tool for creating [GitLab Release](https://docs.gitlab.com/ee/user/project/releases/).
## Example
```
$ glr -upload ./dist v0.1.0
[Created release]
Title: v0.1.0
Release assets:
--> glr_v0.1.0_darwin_amd64.zip: https://gitlab.com/shiimaxx/glr-demo/uploads/.../glr_v0.1.0_darwin_amd64.zip
--> glr_v0.1.0_linux_amd64.tar.gz: https://gitlab.com/shiimaxx/glr-demo/uploads/.../glr_v0.1.0_linux_amd64.tar.gz
--> glr_v0.1.0_windows_amd64.zip: https://gitlab.com/shiimaxx/glr-demo/uploads/.../glr_v0.1.0_windows_amd64.zip
```## Usage
Run the `glr` after you moved to the GitLab project root directory.
```
$ glr [options] TAG
````TAG` is a git tag. You must be specified a git tag in an argument.
When including assets in the release, use `-upload` option for uploading assets, or use `-asset-name` and `--asset-url` options for specifying any link.
## GitLab Token
Please set your GitLab Token. You can get GitLab Token from [this page](https://gitlab.com/profile/personal_access_tokens).
```
$ export GITLAB_TOKEN=...
```## GitLab API Endpoint
Default GitLab API Endpoint is `https://gitlab.com/api/v4/`. You can change it via `GITLAB_API`.
```
export GITLAB_API=https://gitlab.example.com/api/v4/
```## Release assets links
GitLab Release has two type of release assets that are **Souce code** and **Links**.
`glr` support creating asset links. Each link has properties that name and URL.
URL is a link to actual asset file like
- Built artifacts in GitLab CI
- External file
- Uploaded file in the projectIf you want to create assets links for exists assets like build artifacts and external file, you can use `-asset-name` and `--asset-url` options for specifying assets URL.
Also, if you use `-upload` option, can uploading local assets at the same time of creating a release and create assets links for that.
See also [GitLab Docs - GitLab Release](https://docs.gitlab.com/ee/user/project/releases/index.html).
## Install
- Download binary from [release page](https://github.com/shiimaxx/glr/releases)
- Copy binary to `$PATH` directory