Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carlsberg/gh-releaser
GitHub CLI extension to simplify starting and closing releases in GitFlow-based projects.
https://github.com/carlsberg/gh-releaser
automation gh-extension github github-actions hacktoberfest release
Last synced: 5 days ago
JSON representation
GitHub CLI extension to simplify starting and closing releases in GitFlow-based projects.
- Host: GitHub
- URL: https://github.com/carlsberg/gh-releaser
- Owner: carlsberg
- License: mit
- Created: 2021-09-13T18:28:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-07T16:24:20.000Z (over 2 years ago)
- Last Synced: 2024-08-02T16:11:37.547Z (3 months ago)
- Topics: automation, gh-extension, github, github-actions, hacktoberfest, release
- Language: TypeScript
- Homepage:
- Size: 74.2 KB
- Stars: 23
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
- awesome-gh-cli-extensions - **releaser** - Extension to simplify starting and closing releases in GitFlow-based projects. (Tool)
- jimsghstars - carlsberg/gh-releaser - GitHub CLI extension to simplify starting and closing releases in GitFlow-based projects. (TypeScript)
README
# GitHub Releaser
> [GitHub CLI](https://cli.github.com) extension to simplify starting and
> closing releases in GitFlow-based projects.## Installation
```bash
$ gh extensions install carlsberg/gh-releaser
```## Commands
### `gh releaser start `
Starts a new release.
- Creates a release branch (i.e. `release/1.0.0`)
- Creates a GitHub Release in _draft_
- Creates a Pull Request to merge the release branch to the main branch### `gh releaser close`
Closes an existing release.
- Merges the Pull Request
- Publishes the GitHub release### `gh releaser update `
Updates the version for an open release.
- Renames the existing release branch
- Closes old Pull Request
- Creates a new GitHub Release (doesn't delete the previous)
- Creates a new Pull Request with the new branch### `gh releaser pr`
Shows the Pull Request number for an open release.
## Using in GitHub Workflows
Click to expand the example
```yaml
name: Releaseon:
workflow_dispatch:
inputs:
tag:
description: Tag
required: truejobs:
start-release:
name: Start Release
runs-on: ubuntu-latest
needs: setup
steps:
- name: Start Release
run: |
gh extensions install carlsberg/gh-releaser
gh releaser start
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}qa-approval:
name: QA Approval
runs-on: ubuntu-latest
needs: start-release
environment: release
steps:
- name: Add approval label
run: |
gh extensions install carlsberg/gh-releaser
gh pr edit $(gh releaser pr) --add-label "approved:qa"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}stakeholder-approval:
name: Stakeholder Approval
runs-on: ubuntu-latest
needs: qa-approval
environment: release
steps:
- name: Add approval label
run: |
gh extensions install carlsberg/gh-releaser
gh pr edit $(gh releaser pr) --add-label "approved:stkh"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}close-release:
name: Close Release
runs-on: ubuntu-latest
needs: stakeholder-approval
environment: release
steps:
- name: Close Release
run: |
gh extensions install carlsberg/gh-releaser
gh releaser close
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
```## Contributing
Please, see [CONTRIBUTING.md](CONTRIBUTING.md) to learn how you can contribute
to this repository. Every contribution is welcome!## License
This project is released under the [MIT License](LICENSE).