Skip to content

Commit fdd7eb7

Browse files
committed
forgot to configure the path
1 parent ace3e8c commit fdd7eb7

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/actions/github-release/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
version:
1212
description: "Version to release"
1313
required: true
14+
path:
15+
description: "Path for the artifacts"
16+
required: true
17+
default: ""
1418
runs:
1519
using: "node12"
1620
main: "dist/index.js"

.github/actions/github-release/src/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as core from "@actions/core";
22
import * as github from "@actions/github";
33
import { lstatSync, readFileSync } from "fs";
44
import { getType } from "mime";
5-
import { basename } from "path";
5+
import { basename, join } from "path";
66
import { Context } from "@actions/github/lib/context";
77

88
function 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

.github/workflows/release-package.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,4 @@ jobs:
9898
token: ${{ secrets.GITHUB_TOKEN }}
9999
sha: ${{ env.action_sha }}
100100
version: ${{ env.package_version }}
101+
path: ${{ env.OUTPUT_PATH }}

0 commit comments

Comments
 (0)