git-release
A GitHub Action for creating a GitHub Release with Assets and Changelog whenever a new Tag is pushed to the repository.
Features
- Parse Tag to match Semantic Versioning
- Upload build artifacts (assets) to the release
- Add a changelog to the release
- Linux/Windows runners supported
- Filename pattern matching
Manual
- Add changes to
CHANGELOG.mdaccording to keepachangelog.com. For example:
## [3.4.0] - 2020-07-10
### Added
- Glob pattern support
- Unit Tests
- Log version
### Fixed
- Exception on margins larger than context of changelog
- Nil pointer exception in 'release' package
### Changed
- Refactor JavaScript wrapper
## [3.3.0] - 2020-06-27
### Added
- Wrapper script: allow execution on Windows runners
### Changed
- Action execution through Git: from Docker to NodeJS
[3.4.0]: https://github.com/anton-yurchenko/git-release/compare/v3.3.0...v3.4.0
[3.3.0]: https://github.com/anton-yurchenko/git-release/releases/tag/v3.3.0- Tag a commit with Version (according to semver.org).
- Push and watch Git-Release publishing a Release on GitHub
😉

Configuration
- Change the workflow to be triggered on Tag Push:
- For example
'*'or a more specific like'v*':
- For example
on:
push:
tags:
- 'v*'- Add Release step to your workflow:
- name: Release
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_EMPTY_CHANGELOG: "false"
ALLOW_TAG_PREFIX: "true"
with:
args: |
build/*-amd64.zipℹ️ All Configuration Options
- Provide a list of assets as
args(divided by one of:new line,space,comma,pipe) DRAFT_RELEASE (true/false as string)- Save release as draft instead of publishing it (defaultfalse).PRE_RELEASE (true/false as string)- GitHub will point out that this release is identified as non-production ready (default:false).CHANGELOG_FILE (string)- Changelog filename (default:CHANGELOG.md).- set to
nonein order to completely ignore changelog.
- set to
ALLOW_EMPTY_CHANGELOG (true/false as string)- Allow publishing a release without changelog (defaultfalse).ALLOW_TAG_PREFIX (true/false as string)- Allow prefix on version Tag, for examplev3.2.0orrelease-3.2.0(default:false).RELEASE_NAME (string)- Complete release title (may not be combined with PREFIX or POSTFIX).RELEASE_NAME_PREFIX (string)- Release title prefix.RELEASE_NAME_POSTFIX (string)- Release title postfix.
ℹ️ Windows Runners
Execute git-release through JavaScrip Wrapper on Windows Runners.
Example:
- name: Release
uses: anton-yurchenko/git-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_EMPTY_CHANGELOG: "false"
ALLOW_TAG_PREFIX: "true"
with:
args: |
build\\darwin-amd64.zip
build\\linux-amd64.zip
build\\windows-amd64.zipRemarks
- Git Tag should be identical to Changelog Version (without prefixes), for example tag
v1.0.0and changelog version1.0.0. - This action is automatically built at Docker Hub, and tagged with
latest / v3 / v3.4 / v3.4.1. You may lock to a certain version instead of using latest.
(Recommended to lock against a major version, for examplev3) - Instead of using a pre-built Docker image, you may execute the action through JavaScript wrapper by changing
docker://antonyurchenko/git-release:latesttoanton-yurchenko/git-release@master
License
MIT © 2019-present Anton Yurchenko
