@@ -2,7 +2,7 @@ import * as core from "@actions/core";
22import * as github from "@actions/github" ;
33import { lstatSync , readFileSync } from "fs" ;
44import { getType } from "mime" ;
5- import { basename } from "path" ;
5+ import { basename , join } from "path" ;
66import { Context } from "@actions/github/lib/context" ;
77
88function mimeOrDefault ( path : string ) {
@@ -42,8 +42,11 @@ async function run() {
4242 const token = core . getInput ( "token" ) ;
4343 const sha = core . getInput ( "sha" ) ;
4444 const version = core . getInput ( "version" ) ;
45+ const artifactPath = core . getInput ( "path" ) ;
4546
46- const releaseNotes = readFileSync ( "changelog.md" , { encoding : "UTF8" } ) ;
47+ const releaseNotes = readFileSync ( join ( artifactPath , "changelog.md" ) , {
48+ encoding : "UTF8"
49+ } ) ;
4750
4851 const octokit = new github . GitHub ( token ) ;
4952 const context = github . context ;
@@ -60,13 +63,13 @@ async function run() {
6063 octokit ,
6164 context ,
6265 release . data . upload_url ,
63- `FSharp.CosmosDb.${ version } .nupkg`
66+ join ( artifactPath , `FSharp.CosmosDb.${ version } .nupkg` )
6467 ) ;
6568 await upload (
6669 octokit ,
6770 context ,
6871 release . data . upload_url ,
69- `FSharp.CosmosDb.Analyzer.${ version } .nupkg`
72+ join ( artifactPath , `FSharp.CosmosDb.Analyzer.${ version } .nupkg` )
7073 ) ;
7174}
7275
0 commit comments