Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/git-releaser/git-releaser
Tool for creating Git Releases using Conventional Commits and Pull/Merge Requests
https://github.com/git-releaser/git-releaser
github gitlab release-automation
Last synced: 2 months ago
JSON representation
Tool for creating Git Releases using Conventional Commits and Pull/Merge Requests
- Host: GitHub
- URL: https://github.com/git-releaser/git-releaser
- Owner: git-releaser
- License: apache-2.0
- Created: 2023-12-03T23:38:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-05T15:28:14.000Z (3 months ago)
- Last Synced: 2024-11-05T16:37:26.342Z (3 months ago)
- Topics: github, gitlab, release-automation
- Language: Go
- Homepage:
- Size: 4.62 MB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# git-releaser
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/git-releaser/git-releaser)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/git-releaser/git-releaser/release.yaml)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/git-releaser/git-releaser)`git-releaser` is a tool for creating Git releases based on [Semantic Versioning](https://semver.org/) heavily inspired by [release-please](https://github.com/release-please/release-please).
It is designed to be used in CI/CD pipelines to automate the creation of Git releases using PRs.
## Providers
Currently, `git-releaser` works best with GitLab. GitHub support is planned and more providers can be added in the future.![](https://img.shields.io/badge/gitlab-ready-blue)
![](https://img.shields.io/badge/github-ready-blue)# CLI Installation
## Linux/Mac via brew
```
brew tap git-releaser/git-releaser
brew install git-releaser
```Failing Installation on WSL or Linux (missing gcc)
When installing Homebrew on WSL or Linux, you may encounter the following error:```
==> Installing git-releaser from git-releaser/git-releaser Error: The following formula cannot be installed from a bottle and must be
built from the source. git-releaser Install Clang or run brew install gcc.
```If you install gcc as suggested, the problem will persist. Therefore, you need to install the build-essential package.
```
sudo apt-get update
sudo apt-get install build-essential
```## Quick Start
You can either use the CLI tool `git-releaser initialize -p provider` to generate the initial configuration or create it manually.The most important part of the configuration is the `.git-releaser-manifest.yaml` file which contains the current version of your project. This file should be committed to your repository.
Please note that the first release will be created based on the version specified in the configuration file. Afterward, the version will be updated automatically.
```json
{"version": "0.1.0"}
```### GitLab
* Create a new [GitLab Personal Access Token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with `api` scope.
* Create a new `.git-releaser-manifest.yaml` in your repository with the following content:
```json
{"version": "0.1.0"}
```* Create a new `.gitlab-ci.yml` file in your repository with the following content:
```yaml
stages:
- releasevariables:
DOCKER_IMAGE: "ghcr.io/git-releaser/git-releaser:dev-202312060656"
GIT_RELEASER_PROVIDER: "gitlab"
GIT_RELEASER_USER_ID: ""
GIT_RELEASER_TOKEN: $PAT
GIT_RELEASER_PROJECT_URL: ""
GIT_RELEASER_PROJECT_ID: $CI_PROJECT_IDrun-release:
stage: release
script:
- git clone $GIT_RELEASER_PROJECT_URL
- cd git-releaser-demo
- /git-releaser update
image:
name: $DOCKER_IMAGE
entrypoint: [""]
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: always
```* If you run the SaaS version of GitLab, the API URL is automatically detected. If you run a self-hosted version of GitLab, you need to set the `GIT_RELEASER_API_URL` variable to the URL of your GitLab instance.
* Afterwards, commit and push the changes to your repository. This will trigger a new pipeline which will create a new release based on the latest PRs merged into the `main` branch.
* When a new change is merged into the `main` branch, a new release merge will be created automatically.
* When this merge request is merged, a new release will be created automatically.
### GitHub
Take a look at our [GitHub Action](https://github.com/git-release/git-releaser-action) to use `git-releaser` with GitHub.### Updating the version in config files
`git-releaser` can also update the version in config files. To do so, you need to specify the extra files in a `.git-releaser-config.yaml` file:```yaml
extra_files:
- path: test2.txt
```If the test2.txt file contains the following content:
```
my_version: 0.0.1 # x-git-releaser-version
other_version: 0.0.2
```git-releaser will update the version specified n my_version during the release.
###
## Contributing
Please read our [contributing guide](./CONTRIBUTING.md).