Skip to content

Commit

Permalink
Merge pull request #28 from csexton/output-url
Browse files Browse the repository at this point in the history
Add the release HTML URL to outputs
  • Loading branch information
softprops committed Oct 18, 2019
2 parents 6247f92 + 723bed6 commit 56b4c8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions action.yml
Expand Up @@ -23,6 +23,9 @@ inputs:
required: false
env:
'GITHUB_TOKEN': 'As provided by Github Actions'
outputs:
url:
description: 'URL to the Release HTML Page'
runs:
using: 'node12'
main: 'lib/main.js'
Expand Down
1 change: 1 addition & 0 deletions lib/main.js
Expand Up @@ -29,6 +29,7 @@ function run() {
}));
}
console.log(`馃帀 Release ready at ${rel.html_url}`);
core_1.setOutput('url', rel.html_url);
}
catch (error) {
core_1.setFailed(error.message);
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
@@ -1,6 +1,6 @@
import { paths, parseConfig, isTag } from "./util";
import { release, upload, GitHubReleaser } from "./github";
import { setFailed } from "@actions/core";
import { setFailed, setOutput } from "@actions/core";
import { GitHub } from "@actions/github";
import { env } from "process";

Expand All @@ -18,6 +18,7 @@ async function run() {
});
}
console.log(`馃帀 Release ready at ${rel.html_url}`);
setOutput('url', rel.html_url);
} catch (error) {
setFailed(error.message);
}
Expand Down

0 comments on commit 56b4c8a

Please sign in to comment.