Skip to content

Commit 358f5b7

Browse files
authored
Merge pull request #1 from hanseartic/include-readme-into-js-action-tags
Adds readme to js-action's glob
2 parents e63ab54 + 2dec894 commit 358f5b7

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/glob-patterns.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import fs from 'node:fs';
33
import type { Arguments } from './types';
44

55
const templates: Record<string, string[]> = {
6-
'composite-action': ['action.{yml,yaml}', 'LICENSE'],
7-
'javascript-action': ['action.{yml,yaml}', 'dist/**', 'LICENSE'],
6+
'composite-action': ['action.{yml,yaml}', 'LICENSE', 'README{,.md}'],
7+
'javascript-action': ['action.{yml,yaml}', 'dist/**', 'LICENSE', 'README{,.md}'],
88
};
99

1010
const extractNames = (input: string) =>

test/glob-patterns.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ describe('glob patterns tests', () => {
1919

2020
const result = getIncludePatterns(args);
2121

22-
expect(result).toEqual(['action.{yml,yaml}', 'LICENSE']);
22+
expect(result).toEqual(['action.{yml,yaml}', 'LICENSE', 'README{,.md}']);
2323
});
2424

2525
it('returns a javascript-action pattern when template is javascript-action', () => {
2626
const args = { template: 'javascript-action', include: '' };
2727

2828
const result = getIncludePatterns(args);
2929

30-
expect(result).toEqual(['action.{yml,yaml}', 'dist/**', 'LICENSE']);
30+
expect(result).toEqual(['action.{yml,yaml}', 'dist/**', 'LICENSE', 'README{,.md}']);
3131
});
3232

3333
it('throws an error when an invalid template is specified', () => {
@@ -74,6 +74,7 @@ describe('glob patterns tests', () => {
7474
'action.{yml,yaml}',
7575
'dist/**',
7676
'LICENSE',
77+
'README{,.md}',
7778
'README.md',
7879
'!src/*.ts',
7980
]);

0 commit comments

Comments
 (0)