Skip to content

Commit 518a17a

Browse files
committed
Merge branch 'master' of github.com:semantic-release/github into beta
2 parents d260bfd + 72bc1cd commit 518a17a

File tree

10 files changed

+533
-487
lines changed

10 files changed

+533
-487
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
name: release
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
21+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2323
with:
2424
cache: npm
2525
node-version: lts/*

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
- ubuntu-latest
2727
runs-on: "${{ matrix.os }}"
2828
steps:
29-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3030
- name: "Use Node.js ${{ matrix.node-version }}"
31-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
31+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3232
with:
3333
node-version: "${{ matrix.node-version }}"
3434
cache: npm
@@ -43,11 +43,11 @@ jobs:
4343
timeout-minutes: 5
4444

4545
steps:
46-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4747
- run: git config --global user.name github-actions
4848
- run: git config --global user.email github-actions@github.com
4949
- name: Use Node.js from .nvmrc
50-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
50+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
5151
with:
5252
node-version-file: .nvmrc
5353
cache: npm

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to publish a
44
[GitHub release](https://help.github.com/articles/about-releases) and comment on released Pull Requests/Issues.
55

6-
[![Build Status](https://github.com/semantic-release/github/workflows/Test/badge.svg)](https://github.com/semantic-release/github/actions?query=workflow%3ATest+branch%3Amaster)
6+
[![Build Status](https://github.com/semantic-release/github/actions/workflows/test.yml/badge.svg)](https://github.com/semantic-release/github/actions/workflows/test.yml?query=branch%3Amaster)
77

88
[![npm latest version](https://img.shields.io/npm/v/@semantic-release/github/latest.svg)](https://www.npmjs.com/package/@semantic-release/github)
99
[![npm next version](https://img.shields.io/npm/v/@semantic-release/github/next.svg)](https://www.npmjs.com/package/@semantic-release/github)

lib/glob-assets.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { basename, resolve } from "node:path";
22

33
import { isPlainObject, castArray, uniqWith, uniq } from "lodash-es";
44
import dirGlob from "dir-glob";
5-
import { globby } from "globby";
5+
import { glob as tinyglobby } from "tinyglobby";
66
import debugFactory from "debug";
77

88
const debug = debugFactory("semantic-release:github");
@@ -27,7 +27,7 @@ export default async function globAssets({ cwd }, assets) {
2727
return [];
2828
}
2929

30-
const globbed = await globby(glob, {
30+
const globbed = await tinyglobby(glob, {
3131
cwd,
3232
expandDirectories: false, // TODO Temporary workaround for https://github.com/mrmlnc/fast-glob/issues/47
3333
dot: true,

lib/publish.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,11 @@ export default async function publish(pluginConfig, context, { Octokit }) {
107107
await Promise.all(
108108
globbedAssets.map(async (asset) => {
109109
const filePath = isPlainObject(asset) ? asset.path : asset;
110+
const resolved = resolve(cwd, filePath);
110111
let file;
111112

112113
try {
113-
file = await stat(resolve(cwd, filePath));
114+
file = await stat(resolved);
114115
} catch {
115116
logger.error(
116117
"The asset %s cannot be read, and will be ignored.",
@@ -122,7 +123,7 @@ export default async function publish(pluginConfig, context, { Octokit }) {
122123
if (!file || !file.isFile()) {
123124
logger.error(
124125
"The asset %s is not a file, and will be ignored.",
125-
filePath,
126+
resolved,
126127
);
127128
return;
128129
}
@@ -131,7 +132,7 @@ export default async function publish(pluginConfig, context, { Octokit }) {
131132
const upload = {
132133
method: "POST",
133134
url: uploadUrl,
134-
data: await readFile(resolve(cwd, filePath)),
135+
data: await readFile(resolved),
135136
name: fileName,
136137
headers: {
137138
"content-type": mime.getType(extname(fileName)) || "text/plain",

lib/success.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ export default async function success(pluginConfig, context, { Octokit }) {
265265

266266
if (failComment === false || failTitle === false) {
267267
logger.log("Skip closing issue.");
268+
logger.warn(
269+
`DEPRECATION: 'false' for 'failComment' or 'failTitle' is deprecated and will be removed in a future major version. Use 'failCommentCondition' instead.`,
270+
);
271+
} else if (failCommentCondition === false) {
272+
logger.log("Skip closing issue.");
268273
} else {
269274
const srIssues = await findSRIssues(octokit, logger, labels, owner, repo);
270275

0 commit comments

Comments
 (0)