diff --git a/.dockerignore b/.dockerignore index 867031d..5cca5ba 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ +.github/ .vscode/ .idea/ .gitignore diff --git a/CHANGELOG.md b/CHANGELOG.md index e4ff9d2..6de344a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,29 @@ +## [2.0.0] - 2019-12-28 +This is a major release as most of the code was refactored and some behavior was changed, for example "Tag version is set as a release title". + +### Fixed +- Artifact files not found caused panic - all files now being validated before release creation +- Custom changelog file now being validated before release creation +- Arguments parsing fixed + +### Added +- Unit testing +- Docker image now built from scratch, resulting in decreased size 139.73MB -> 2.43MB, improving action overall speed. +- **app** package +- `ALLOW_EMPTY_CHANGELOG` env.var to allow publishing a release without changelog (default **false**) +- Artifacts (provided as arguments) can now be separated by one of: `new line '\n', pipe '|', space ' ', comma ','` + +### Changed +- **local** package renamed to **repository** +- **remote** package splitted into 2 packages: **asset**, **release** +- Tag version is set as a release title + ## [1.1.0] - 2019-12-21 ### Added - [PR #3](https://github.com/anton-yurchenko/git-release/pull/3) Allow any prefix to semver tag. (*Thanks to [Taylor Becker](https://github.com/tajobe) for the PR*) ### Fixed -- PreRelease overwriting Draft configuration. (*Thanks to [Taylor Becker](https://github.com/tajobe) for the reporting an issue*) +- PreRelease overwriting Draft configuration. (*Thanks to [Taylor Becker](https://github.com/tajobe) for reporting an issue*) ## [1.0.0] - 2019-10-01 - First stable release. diff --git a/Makefile b/Makefile index 75a1dbb..29a559c 100644 --- a/Makefile +++ b/Makefile @@ -39,4 +39,4 @@ release: test .PHONY: codecov codecov: test - @go tool cover -html=codecoverage.out \ No newline at end of file + @go tool cover -html=coverage.txt \ No newline at end of file diff --git a/README.md b/README.md index 1a6ca78..157e06e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # git-release -[![License](https://img.shields.io/github/license/anton-yurchenko/git-release?style=flat-square)](LICENSE.md) [![Release](https://img.shields.io/github/v/release/anton-yurchenko/git-release?style=flat-square)](https://github.com/anton-yurchenko/git-release/releases/latest) [![Docker Build](https://img.shields.io/docker/cloud/build/antonyurchenko/git-release?style=flat-square)](https://hub.docker.com/r/antonyurchenko/git-release) [![Docker Pulls](https://img.shields.io/docker/pulls/antonyurchenko/git-release?style=flat-square)](https://hub.docker.com/r/antonyurchenko/git-release) +[![Release](https://img.shields.io/github/v/release/anton-yurchenko/git-release)](https://github.com/anton-yurchenko/git-release/releases/latest) [![codecov](https://codecov.io/gh/anton-yurchenko/git-release/branch/master/graph/badge.svg)](https://codecov.io/gh/anton-yurchenko/git-release) [![Go Report Card](https://goreportcard.com/badge/github.com/anton-yurchenko/git-release)](https://goreportcard.com/report/github.com/anton-yurchenko/git-release) [![Docker Build](https://img.shields.io/docker/cloud/build/antonyurchenko/git-release)](https://hub.docker.com/r/antonyurchenko/git-release) [![Docker Pulls](https://img.shields.io/docker/pulls/antonyurchenko/git-release)](https://hub.docker.com/r/antonyurchenko/git-release) [![License](https://img.shields.io/github/license/anton-yurchenko/git-release)](LICENSE.md) A GitHub Action for creating a GitHub Release with Assets and Changelog whenever a Version Tag is pushed to the project. @@ -13,37 +13,42 @@ A GitHub Action for creating a GitHub Release with Assets and Changelog whenever ## Manual: 1. Add your changes to **CHANGELOG.md** in the following format (according to [keepachangelog.com](https://keepachangelog.com/en/1.0.0/ "Keep a ChangeLog")): ``` -## [2.1.5] - 2019-10-01 +## [2.0.0] - 2019-12-21 ### Added -- Feature 1. -- Feature 2. +- Feature A +- Feature B +- GitHub Actions as a CI system +- GitHub Release as an Artifactory system ### Changed -- Logger timestamp. +- User API ### Removed -- Old library. -- Configuration file. +- Previous CI build +- Previous Artifactory ``` 2. Tag a commit with Version (according to [semver.org](https://semver.org/ "Semantic Versioning")). - - Extensions like **alpha/beta/rc/...** are not supported. + - Prefixes like **release-/v/...** are supported. + - **Postfixes are not supported**. 3. Push and watch **Git-Release** publishing a Release on GitHub ;-) ![PIC](docs/images/log.png) ## Configuration: 1. Change the workflow to be triggered on Tag Push: - - Use either `'*'` or `'v*` + - Use either `'*'` or a more specific like `'v*'` or `'release-*'` ``` on: push: tags: - 'v*' ``` -2. Add Release stage to your workflow: - - **Optional**: Provide a list of assets as **args** - - **Optional**: `DRAFT_RELEASE: "true"/"false"` - Save release as draft instead of publishing it (default `false`). - - **Optional**: `PRE_RELEASE: "true"/"false"` - GitHub will point out that this release is identified as non-production ready (default `false`). - - **Optional**: `CHANGELOG_FILE: "changes.md"` - Changelog filename (default `CHANGELOG.md`). +2. Add Release stage to your workflow: + - Customize configuration with env.vars: + - Provide a list of assets as **args** + - `DRAFT_RELEASE: "true"` - Save release as draft instead of publishing it (default `false`). + - `PRE_RELEASE: "true"` - GitHub will point out that this release is identified as non-production ready (default `false`). + - `CHANGELOG_FILE: "changes.md"` - Changelog filename (default `CHANGELOG.md`). + - `ALLOW_EMPTY_CHANGELOG: "true"` - Allow publishing a release without changelog (default `false`). ``` - name: Release uses: docker://antonyurchenko/git-release:latest @@ -54,13 +59,13 @@ on: CHANGELOG_FILE: "CHANGELOG.md" with: args: | - build/release/artifact-darwin-amd64.zip - build/release/artifact-linux-amd64.zip - build/release/artifact-windows-amd64.zip + build/release/darwin-amd64.zip + build/release/linux-amd64.zip + build/release/windows-amd64.zip ``` ## Remarks: -- This action is automatically built at Docker Hub, and tagged with `latest / v1 / v1.0 / v1.0.0`. You may lock to a certain version instead of using **latest**. (*Recommended to lock against a major version, for example* `v1`). +- This action is automatically built at Docker Hub, and tagged with `latest / v2 / v2.0 / v2.0.0`. You may lock to a certain version instead of using **latest**. (*Recommended to lock against a major version, for example* `v2`). - Instead of using pre-built image, you may build it during the execution of your flow by changing `docker://antonyurchenko/git-release:latest` to `anton-yurchenko/git-release@master` ## License diff --git a/docs/images/log.png b/docs/images/log.png index eca5d4e..5f8cd76 100644 Binary files a/docs/images/log.png and b/docs/images/log.png differ diff --git a/docs/images/release.png b/docs/images/release.png index 487f68f..66f5648 100644 Binary files a/docs/images/release.png and b/docs/images/release.png differ