# README
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/ARM runners supported
- Filename pattern matching
Manual
- Add changes to
CHANGELOG.md
according 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 :wink:
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
:information_source: 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
none
in order to completely ignore changelog. This enables to run the action without repository checkout.
- 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.0
orrelease-3.2.0
(default:false
).RELEASE_NAME (string)
- Complete release title (may not be combined with PREFIX or SUFFIX).RELEASE_NAME_PREFIX (string)
- Release title prefix.RELEASE_NAME_SUFFIX (string)
- Release title suffix.
:information_source: 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.zip
:information_source: Configuration Examples
Remarks
- Git Tag should be identical to Changelog Version (without prefixes), for example tag
v1.0.0
and 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:latest
toanton-yurchenko/git-release@master
(might be unstable) git-release
operates assets with pattern matching, this means that it is unable to validate whether an asset exists or not.- Docker image is published both to Docker Hub and GitHub Packages. If you don't want to rely on Docker Hub but still want to use the dockerized action, you may switch from
uses: docker://antonyurchenko/git-release:v3
touses: docker://ghcr.io/anton-yurchenko/git-release:v1
License
MIT © 2019-present Anton Yurchenko