Skip to content

Commit 3531c89

Browse files
committed
Add asset name as output parameter
1 parent 71d3719 commit 3531c89

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ inputs:
1717
outputs:
1818
browser_download_url:
1919
description: 'The URL users can navigate to in order to download the uploaded asset'
20-
file_md5:
20+
asset_md5:
2121
description: 'Provides md5 for the uploaded file'
22+
asset_name:
23+
description: 'The name of uploaded asset'
2224
runs:
2325
using: 'node12'
2426
main: 'dist/index.js'

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4120,7 +4120,6 @@ const md5File = __webpack_require__(813);
41204120

41214121
async function run() {
41224122
try {
4123-
console.log('startiing');
41244123
// Get authenticated GitHub client (Ocktokit): https://github.com/actions/toolkit/tree/master/packages/github#usage
41254124
const github = new GitHub(process.env.GITHUB_TOKEN);
41264125

@@ -4153,7 +4152,8 @@ async function run() {
41534152

41544153
// Set the output variable for use by other actions: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
41554154
core.setOutput('browser_download_url', browserDownloadUrl);
4156-
core.setOutput('file_md5', fileMD5);
4155+
core.setOutput('asset_md5', fileMD5);
4156+
core.setOutput('asset_name', assetName);
41574157
} catch (error) {
41584158
core.setFailed(error.message);
41594159
}

src/upload-release-asset.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const md5File = require('md5-file');
55

66
async function run() {
77
try {
8-
console.log('startiing');
98
// Get authenticated GitHub client (Ocktokit): https://github.com/actions/toolkit/tree/master/packages/github#usage
109
const github = new GitHub(process.env.GITHUB_TOKEN);
1110

@@ -38,7 +37,8 @@ async function run() {
3837

3938
// Set the output variable for use by other actions: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
4039
core.setOutput('browser_download_url', browserDownloadUrl);
41-
core.setOutput('file_md5', fileMD5);
40+
core.setOutput('asset_md5', fileMD5);
41+
core.setOutput('asset_name', assetName);
4242
} catch (error) {
4343
core.setFailed(error.message);
4444
}

0 commit comments

Comments
 (0)