Skip to content

Commit

Permalink
fix: Fix get version errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 8, 2021
1 parent 856eb3b commit e3683e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async function run() {
core.endGroup();
core.setOutput('compareurl', `https://github.com/${owner}/${repo}/compare/${baseRef}...${tagRef || headRef}`);
core.setOutput('changelog', changelog);
core.setOutput('version', getVersion(github.ref).replace(/^v/, ''));
core.setOutput('version', getVersion(github.context.ref || '').replace(/^v/, ''));
} else {
core.setFailed(
'Branch names must contain only numbers, strings, underscores, periods, and dashes.'
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async function run() {
core.endGroup();
core.setOutput('compareurl', `https://github.com/${owner}/${repo}/compare/${baseRef}...${tagRef || headRef}`);
core.setOutput('changelog', changelog);
core.setOutput('version', getVersion(github.ref).replace(/^v/, ''));
core.setOutput('version', getVersion(github.context.ref || '').replace(/^v/, ''));
} else {
core.setFailed(
'Branch names must contain only numbers, strings, underscores, periods, and dashes.'
Expand Down

0 comments on commit e3683e1

Please sign in to comment.