diff --git a/.github/ISSUE_TEMPLATE/report_a_bug.md b/.github/ISSUE_TEMPLATE/report_a_bug.md
index 180d147..0c82972 100644
--- a/.github/ISSUE_TEMPLATE/report_a_bug.md
+++ b/.github/ISSUE_TEMPLATE/report_a_bug.md
@@ -10,6 +10,9 @@ assignees: anton-yurchenko
### Description:
A clear and concise description of what the bug is
+### Tag:
+`Provide Git Tag`
+
### Workflow:
```Attach your GitHub Action Workflow YAML```
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a16e6b..03c1212 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## [3.1.0] - 2020-02-17
+### Added
+- [Issue #10](https://github.com/anton-yurchenko/git-release/issues/10) - Release Title manipulation through `RELEASE_NAME`, `RELEASE_NAME_PREFIX`, `RELEASE_NAME_POSTFIX`. (*Thanks to [Victor](https://github.com/victoraugustolls) for suggesting a change*)
+
## [3.0.1] - 2020-01-08
### Fixed
- Empty release name
@@ -54,10 +58,10 @@ This is a major release as most of the code was refactored and some behavior was
## [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*)
+- [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 reporting an issue*)
+- [PR #3](https://github.com/anton-yurchenko/git-release/pull/3) - 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/README.md b/README.md
index 5ffaae3..add9426 100644
--- a/README.md
+++ b/README.md
@@ -17,9 +17,9 @@ A **GitHub Action** for creating a **GitHub Release** with **Assets** and **Chan
- Add a changelog to the release.
## 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")):
+1. Add changes to `CHANGELOG.md` in the following format (according to [keepachangelog.com](https://keepachangelog.com/en/1.0.0/ "Keep a ChangeLog")):
```
-## [3.0.0-rc.1] - 2019-12-21
+## [3.1.0-rc.1] - 2019-12-21
### Added
- Feature A
- Feature B
@@ -34,7 +34,6 @@ A **GitHub Action** for creating a **GitHub Release** with **Assets** and **Chan
- Previous Artifactory
```
2. Tag a commit with Version (according to [semver.org](https://semver.org/ "Semantic Versioning")).
- - Prefix support is available (for example `v3.0.1`), see configuration section in order to enable it.
3. Push and watch **Git-Release** publishing a Release on GitHub ;-)
![PIC](docs/images/log.png)
@@ -47,14 +46,7 @@ on:
tags:
- 'v*'
```
-2. Add Release stage to your workflow:
- - Customize configuration with **env.vars**:
- - Provide a list of assets as `args` (divided by one of: `new line`, `space`, `comma`, `pipe`)
- - `DRAFT_RELEASE: [true, false]` - Save release as draft instead of publishing it (default `false`).
- - `PRE_RELEASE: [true, false]` - GitHub will point out that this release is identified as non-production ready (default: `false`).
- - `CHANGELOG_FILE: string` - Changelog filename (default: `CHANGELOG.md`).
- - `ALLOW_EMPTY_CHANGELOG: [true, false]` - Allow publishing a release without changelog (default `false`).
- - `ALLOW_TAG_PREFIX: [true, false]` - Allow prefix on version Tag, for example `v3.0.1` or `release-3.0.1` (default: `false`).
+2. Add Release step to your workflow:
```
- name: Release
uses: docker://antonyurchenko/git-release:latest
@@ -63,7 +55,7 @@ on:
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "CHANGELOG.md"
- ALLOW_EMPTY_CHANGELOG: "true"
+ ALLOW_EMPTY_CHANGELOG: "false"
ALLOW_TAG_PREFIX: "true"
with:
args: |
@@ -72,9 +64,25 @@ on:
build/windows-amd64.zip
```
+[Configuration Examples](docs/example.md#examples)
+
+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 (default `false`).
+- `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`).
+- `ALLOW_EMPTY_CHANGELOG (true/false as string)` - Allow publishing a release without changelog (default `false`).
+- `ALLOW_TAG_PREFIX (true/false as string)` - Allow prefix on version Tag, for example `v3.1.0` or `release-3.1.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.
+
+
+
## Remarks:
- **Git Tag** should be identical to **Changelog Version** in order for changes to be parsed properly. This does not include **Tag Prefix** like `release-*`.
-- This action is automatically built at **Docker Hub**, and tagged with `latest / v3 / v3.0 / v3.0.1`. You may lock to a certain version instead of using **latest**.
+- This action is automatically built at **Docker Hub**, and tagged with `latest / v3 / v3.1 / v3.1.0`. You may lock to a certain version instead of using **latest**.
(*Recommended to lock against a major version, for example* `v3`)
- 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`
diff --git a/docs/example.md b/docs/example.md
new file mode 100644
index 0000000..08f22b9
--- /dev/null
+++ b/docs/example.md
@@ -0,0 +1,223 @@
+# Examples:
+- You may pass data between steps in a workflow using [environmental variables](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-environment-variable-set-env)
+- Some examples are based on `run` instruction, which may be easily replaces with another **GitHub Action**
+
+## Pure SemVer tag:
+![PIC](images/release.png)
+
+Workflow
+
+```yaml
+name: release
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - name: Release
+ uses: docker://antonyurchenko/git-release:latest
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ args: |
+ darwin-amd64.zip
+ linux-amd64.zip
+ windows-amd64.zip
+```
+
+
+
+## SemVer tag with prefix:
+![PIC](images/example-tag-prefix.png)
+
+Workflow
+
+```yaml
+name: release
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - name: Release
+ uses: docker://antonyurchenko/git-release:latest
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ ALLOW_TAG_PREFIX: "true"
+ with:
+ args: |
+ darwin-amd64.zip
+ linux-amd64.zip
+ windows-amd64.zip
+```
+
+
+
+## Release title with prefix:
+![PIC](images/example-prefix.png)
+
+Workflow
+
+```yaml
+name: release
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - name: Release
+ uses: docker://antonyurchenko/git-release:latest
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ ALLOW_TAG_PREFIX: "true"
+ RELEASE_NAME_PREFIX: "Release: "
+ with:
+ args: |
+ darwin-amd64.zip
+ linux-amd64.zip
+ windows-amd64.zip
+```
+
+
+
+## Release title with postfix:
+![PIC](images/example-postfix.png)
+
+Workflow
+
+```yaml
+name: release
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - name: Release
+ uses: docker://antonyurchenko/git-release:latest
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ DRAFT_RELEASE: "false"
+ PRE_RELEASE: "true"
+ CHANGELOG_FILE: "CHANGELOG.md"
+ ALLOW_EMPTY_CHANGELOG: "false"
+ ALLOW_TAG_PREFIX: "false"
+ RELEASE_NAME_POSTFIX: " (nightly build)"
+ with:
+ args: |
+ darwin-amd64.zip
+ linux-amd64.zip
+ windows-amd64.zip
+```
+
+
+
+## Release title with prefix and postfix:
+![PIC](images/example-prefix-postfix.png)
+
+Workflow
+
+```yaml
+name: release
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - run: |
+ export PREFIX="Release: "
+ export POSTFIX=" (Codename: 'Ragnarok')"
+ echo "::set-env name=RELEASE_NAME_PREFIX::$PREFIX"
+ echo "::set-env name=RELEASE_NAME_POSTFIX::$POSTFIX"
+
+ - name: Release
+ uses: docker://antonyurchenko/git-release:latest
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ args: |
+ darwin-amd64.zip
+ linux-amd64.zip
+ windows-amd64.zip
+```
+
+
+
+## Release title:
+![PIC](images/example-name.png)
+
+Workflow
+
+```yaml
+name: release
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - run: |
+ export TEXT="Release X"
+ echo "::set-env name=RELEASE_NAME::$TEXT"
+
+ - name: Release
+ uses: docker://antonyurchenko/git-release:latest
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ CHANGELOG_FILE: "CHANGELOG.md"
+ ALLOW_EMPTY_CHANGELOG: "false"
+ ALLOW_TAG_PREFIX: "true"
+ with:
+ args: |
+ darwin-amd64.zip
+ linux-amd64.zip
+ windows-amd64.zip
+```
+
+
diff --git a/docs/images/example-name.png b/docs/images/example-name.png
new file mode 100644
index 0000000..5b9d774
Binary files /dev/null and b/docs/images/example-name.png differ
diff --git a/docs/images/example-postfix.png b/docs/images/example-postfix.png
new file mode 100644
index 0000000..b578492
Binary files /dev/null and b/docs/images/example-postfix.png differ
diff --git a/docs/images/example-prefix-postfix.png b/docs/images/example-prefix-postfix.png
new file mode 100644
index 0000000..f9e0eed
Binary files /dev/null and b/docs/images/example-prefix-postfix.png differ
diff --git a/docs/images/example-prefix.png b/docs/images/example-prefix.png
new file mode 100644
index 0000000..bd377fe
Binary files /dev/null and b/docs/images/example-prefix.png differ
diff --git a/docs/images/example-tag-prefix.png b/docs/images/example-tag-prefix.png
new file mode 100644
index 0000000..b109f22
Binary files /dev/null and b/docs/images/example-tag-prefix.png differ