Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/glob-patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import fs from 'node:fs';
import type { Arguments } from './types';

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

const extractNames = (input: string) =>
Expand Down
5 changes: 3 additions & 2 deletions test/glob-patterns.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ describe('glob patterns tests', () => {

const result = getIncludePatterns(args);

expect(result).toEqual(['action.{yml,yaml}', 'LICENSE']);
expect(result).toEqual(['action.{yml,yaml}', 'LICENSE', 'README{,.md}']);
});

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

const result = getIncludePatterns(args);

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

it('throws an error when an invalid template is specified', () => {
Expand Down Expand Up @@ -74,6 +74,7 @@ describe('glob patterns tests', () => {
'action.{yml,yaml}',
'dist/**',
'LICENSE',
'README{,.md}',
'README.md',
'!src/*.ts',
]);
Expand Down