Skip to content

Commit

Permalink
2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
svenstaro committed Aug 10, 2020
1 parent 0d3c327 commit ec0ba86
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [2.1.0] - 2020-08-10
- Strip refs/heads/ from the input tag [#23](https://github.com/svenstaro/upload-release-action/pull/23) (thanks @OmarEmaraDev)

## [2.0.0] - 2020-07-03
- Add `prerelease` input parameter. Setting this marks the created release as a pre-release.
- Add `release_name` input parameter. Setting this explicitly sets the title of the release.
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2263,7 +2263,7 @@ function run() {
// Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
const token = core.getInput('repo_token', { required: true });
const file = core.getInput('file', { required: true });
const tag = core.getInput('tag', { required: true }).replace('refs/tags/', '');
const tag = core.getInput('tag', { required: true }).replace('refs/tags/', '').replace('refs/heads/', '');
const file_glob = core.getInput('file_glob') == 'true' ? true : false;
const overwrite = core.getInput('overwrite') == 'true' ? true : false;
const prerelease = core.getInput('prerelease') == 'true' ? true : false;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "upload-release-action",
"version": "2.0.0",
"version": "2.1.0",
"private": true,
"description": "Upload files to a GitHub release",
"main": "lib/main.js",
Expand Down
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ async function run(): Promise<void> {
// Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
const token = core.getInput('repo_token', {required: true})
const file = core.getInput('file', {required: true})
const tag = core.getInput('tag', {required: true}).replace('refs/tags/', '').replace('refs/heads/', '')
const tag = core
.getInput('tag', {required: true})
.replace('refs/tags/', '')
.replace('refs/heads/', '')

const file_glob = core.getInput('file_glob') == 'true' ? true : false
const overwrite = core.getInput('overwrite') == 'true' ? true : false
Expand Down

0 comments on commit ec0ba86

Please sign in to comment.