https://github.com/nwillc/gorelease
A Go GitHub Release tagging tool
https://github.com/nwillc/gorelease
Last synced: 6 months ago
JSON representation
A Go GitHub Release tagging tool
- Host: GitHub
- URL: https://github.com/nwillc/gorelease
- Owner: nwillc
- License: isc
- Created: 2020-09-13T20:15:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-05T17:42:05.000Z (almost 4 years ago)
- Last Synced: 2024-06-21T15:38:17.015Z (about 2 years ago)
- Language: Go
- Size: 78.1 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://tldrlegal.com/license/-isc-license)
[](https://github.com/nwillc/gorelease/actions?query=workflow%3CI)
[](https://goreportcard.com/report/github.com/nwillc/gorelease)
[](https://github.com/nwillc/gorelease/releases/latest)
------
# Go Release!
A simple program to handle GitHub releases for Go repositories.
# Get
```bash
go install github.com/nwillc/gorelease@latest
```
# Setup
Your repository should contain the following:
```text
.version
LICENSE.md (Optional)
```
## Your Semantic Version
The `.version` file should contain the semantic version tag you want to use, for example `v0.1.0`.
## Your Code License
This file (`LICENSE.md` or `LICENSE`) is optional, if present the text it contains will be used as a comment in
the `version.go` files generated.
# Use
Assuming you've set up as above.
1. Commit your code in preparation for release.
1. Update the `.version` file with a new version number.
1. Run `gorelease`
This will:
1. generate a new `gen/version/version.go`
1. Create a tag with the version in `.version`
1. push the tag
1. push the repository
If the push fails due to credential issues it will inform you how to do the push manually.
# Using the version in your code
This program will generate a `gen/version/version.go` file like [the one in this repo](./gen/version/version.go).
You can reference `version.Version` in your code to access the version tag of the current release.
# Options
```text
Usage of gorelease:
-dirty
Allow dirty repository with uncommitted files.
-dry-run
Perform a dry run, no files changed or tags/files pushed.
-output string
Where to put the output version.go file (default "gen/version/version.go")
-version
Display version.
```