Compare commits

...

60 Commits

Author SHA1 Message Date
b4b15b8c7c Merge pull request #632 from actions/joshmgross/undo-dependency-changes
Undo indirect dependency updates from #627
2024-10-09 13:16:31 -04:00
92b01ebffa Undo indirect dependency updates from #627 2024-10-09 12:35:22 -04:00
84480863f2 Merge pull request #627 from actions/robherley/v4.4.2
Bump `@actions/artifact` to 2.1.11
2024-10-08 14:15:05 -04:00
b1d4642b69 add explicit relative and absolute symlinks to workflow 2024-10-08 13:39:45 -04:00
d50e66084c bump version 2024-10-08 13:35:54 -04:00
aabe6f8050 build with @actions/artifact v2.1.11 2024-10-08 12:46:18 -04:00
604373da63 Merge pull request #625 from actions/robherley/artifact-2.1.10
Update @actions/artifact to latest version, includes symlink and timeout fixes
2024-10-07 11:46:25 -04:00
0150148bdf paste right core version 2024-10-07 09:57:16 -04:00
a009b25faa update licenses 2024-10-07 09:55:37 -04:00
9f6f6f402e update @actions/core and @actions/artifact to latest versions 2024-10-07 09:45:59 -04:00
3eadd8b791 Merge pull request #621 from actions/Jcambass-patch-1
Add workflow file for publishing releases to immutable action package
2024-09-26 08:20:21 +02:00
aeba9f7961 Add workflow file for publishing releases to immutable action package
This workflow file publishes new action releases to the immutable action package of the same name as this repo.

This is part of the Immutable Actions project which is not yet fully released to the public. First party actions like this one are part of our initial testing of this feature.
2024-09-24 15:53:26 +02:00
b18b1d32f3 Merge pull request #607 from actions/joshmgross/hidden-files-readme
Add a section about hidden files
2024-09-02 10:39:50 -04:00
d7c12077c4 Add a section about hidden files 2024-09-02 10:30:03 -04:00
50769540e7 Merge pull request #598 from actions/joshmgross/exclude-hidden-files
Exclude hidden files by default
2024-08-29 10:38:39 -04:00
d52396ac5d Add a warning about enabling include-hidden-files 2024-08-15 19:45:59 -04:00
710f362075 Remove "merged" from include-hidden-files input description 2024-08-15 19:39:39 -04:00
3b315f26f6 npm run release again 🙂 2024-08-15 17:36:20 -04:00
3be2180eb7 Remove another trailing comma 2024-08-15 17:35:00 -04:00
453e8d0a40 Update glob license 2024-08-15 17:31:21 -04:00
0a398c1480 npm run release 2024-08-15 17:30:44 -04:00
a0c40cf602 Update to latest @actions/glob and fix tests 2024-08-15 17:26:43 -04:00
acb59e4776 lint 2024-08-15 16:31:57 -04:00
cb6558bb10 Exclude hidden files by default 2024-08-15 16:22:09 -04:00
834a144ee9 Merge pull request #594 from actions/robherley/4.3.6
Revert to @actions/artifact 2.1.8
2024-08-06 10:41:08 -04:00
134dcf33c0 v4.3.6 2024-08-06 10:24:34 -04:00
73a0b9c954 revert back to @actions/artifact 2.1.8 2024-08-06 10:23:43 -04:00
89ef406dd8 Merge pull request #588 from actions/robherley/4.3.5
Bump @actions/artifact to v2.1.9
2024-08-02 09:59:06 -04:00
23d796df36 license updates 2024-08-01 15:50:32 -04:00
e445c64bc2 bump @actions/artifact to v2.1.9 2024-08-01 15:46:49 -04:00
0b2256b8c0 Merge pull request #584 from actions/robherley/bump-pkgs
Update @actions/artifact version, bump dependencies
2024-07-05 11:11:13 -04:00
488dcefb9b licensed cache 2024-07-05 14:39:15 +00:00
04c51f5766 ncc 2024-07-05 13:55:51 +00:00
32a9e276a8 bump @actions/artifact and npm audit 2024-07-05 13:51:02 +00:00
552bf3722c new version 2024-04-23 11:22:42 -07:00
79616d2ded Merge pull request #565 from actions/eggyhead/use-artifact-v2.1.6
updating toolkit artifact dependency to 2.1.6
2024-04-22 09:19:03 -07:00
65462800fd updating package version 2024-04-22 08:10:47 -07:00
c004fb4bf6 Merge branch 'main' into eggyhead/use-artifact-v2.1.6 2024-04-22 08:08:40 -07:00
90aba496fc updating toolkit artifact dependency to 2.1.6 2024-04-22 08:06:58 -07:00
b06cde36fc Merge pull request #563 from actions/eggyhead/release-4.3.2
updating to release 4.3.2
2024-04-18 08:13:48 -07:00
1746f4ab65 Revert "updating to release 4.3.2"
This reverts commit 31685d04a0.

updating to release 4.3.2
2024-04-18 15:05:07 +00:00
31685d04a0 updating to release 4.3.2 2024-04-18 14:56:48 +00:00
18bf333cd2 Merge pull request #562 from actions/eggyhead/update-artifact-v215
updating `@actions/artifact` dependency to v2.1.5 and `@actions/core` to v1.0.1
2024-04-17 15:05:29 -07:00
dac413befa update package lock version 2024-04-17 21:24:58 +00:00
bb3b4a3cdb updating package version 2024-04-17 20:38:47 +00:00
3e3da837d2 updating artifact and core dependencies 2024-04-17 17:00:25 +00:00
e35774f165 Merge pull request #561 from actions/robherley/deprecation-notice
Update readme with v3/v2/v1 deprecation notice
2024-04-16 17:12:57 -04:00
e63ea677fb Update readme with v3/v2/v1 deprecation notice
- https://github.blog/changelog/2024-02-13-deprecation-notice-v1-and-v2-of-the-artifact-actions/
- https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
2024-04-16 16:48:37 -04:00
ef09cdac3e Merge pull request #523 from andrewakim/andrewakim/migration-readme-fix
Minor fix to the migration readme
2024-02-15 14:06:33 -05:00
00e36f94d8 Minor fix to the migration readme 2024-02-15 11:01:40 -08:00
4c0ff1c489 Update release-new-action-version.yml (#516) 2024-02-05 17:19:59 -05:00
5d5d22a312 Merge pull request #515 from actions/eggyhead/update-artifact-v2.1.1
updating artifact dependency to version 2.1.1
2024-02-05 13:19:54 -08:00
f1e993d966 update artifact license 2024-02-05 17:52:45 +00:00
4881bfd3f2 updating dist: 2024-02-05 17:39:17 +00:00
a30777e265 @eggyhead
updating artifact dependency to version 2.1.1
2024-02-05 17:31:38 +00:00
3a8048248f Merge pull request #511 from actions/robherley/migration-docs-typo
Fix typo with v3 artifact downloads in migration guide
2024-01-31 12:36:26 -05:00
9d63e3f2f8 Merge branch 'main' into robherley/migration-docs-typo 2024-01-31 12:34:24 -05:00
dfa1ab292d fix typo with v3 artifact downloads in migration guide 2024-01-31 12:27:48 -05:00
d00351bf69 Merge pull request #509 from markmssd/patch-1
Update limitation of `10` artifacts upload to `500`
2024-01-29 09:38:17 -05:00
707f5a7b71 Update limitation of 10 artifacts upload to 500
According to https://github.com/actions/upload-artifact/issues/470#issuecomment-1885881535, the limitation has been raised from `10` to `500`. This PR simply updates the docs to reflect the change.
2024-01-27 16:21:08 -05:00
24 changed files with 42636 additions and 32401 deletions

View File

@ -0,0 +1,20 @@
name: 'Publish Immutable Action Version'
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checking out
uses: actions/checkout@v4
- name: Publish
id: publish
uses: actions/publish-immutable-action@0.0.3

View File

@ -22,7 +22,7 @@ jobs:
steps:
- name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag
uses: actions/publish-action@v0.2.1
uses: actions/publish-action@v0.3.0
with:
source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@ -46,14 +46,19 @@ jobs:
- name: Test
run: npm run test
# Test end-to-end by uploading two artifacts and then downloading them
# Test end-to-end by uploading a few artifacts and then downloading them
- name: Create artifact files
run: |
mkdir -p path/to/dir-1
mkdir -p path/to/dir-2
mkdir -p path/to/dir-3
mkdir -p symlink/
echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
echo "Hello world from file #2" > path/to/dir-2/file2.txt
echo "Hello from a symlinked file" > symlink/original.txt
ln -s $(pwd)/symlink/original.txt symlink/abs.txt
ln -s original.txt symlink/rel.txt
shell: bash
# Upload a single file artifact
- name: 'Upload artifact #1'
@ -79,6 +84,14 @@ jobs:
path/to/dir-[23]/*
!path/to/dir-3/*.txt
- name: 'Upload symlinked artifact'
uses: ./
with:
name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
path: |
symlink/abs.txt
symlink/rel.txt
# Download Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1'
uses: actions/download-artifact@v4
@ -141,6 +154,34 @@ jobs:
}
shell: pwsh
- name: 'Download symlinked artifact'
uses: actions/download-artifact@v4
with:
name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
path: from/symlink
- name: 'Verify symlinked artifact'
run: |
$abs = "from/symlink/abs.txt"
if(!(Test-Path -path $abs))
{
Write-Error "Expected file does not exist"
}
if(!((Get-Content $abs) -ceq "Hello from a symlinked file"))
{
Write-Error "File contents of downloaded artifact are incorrect"
}
$rel = "from/symlink/rel.txt"
if(!(Test-Path -path $rel))
{
Write-Error "Expected file does not exist"
}
if(!((Get-Content $rel) -ceq "Hello from a symlinked file"))
{
Write-Error "File contents of downloaded artifact are incorrect"
}
shell: pwsh
- name: 'Alter file 1 content'
run: |
echo "This file has changed" > path/to/dir-1/file1.txt

View File

@ -1,6 +1,6 @@
---
name: "@actions/artifact"
version: 2.1.0
version: 2.1.11
type: npm
summary:
homepage:

View File

@ -1,6 +1,6 @@
---
name: "@actions/core"
version: 1.10.0
version: 1.11.1
type: npm
summary:
homepage:

View File

@ -1,6 +1,6 @@
---
name: "@actions/glob"
version: 0.3.0
version: 0.5.0
type: npm
summary:
homepage:

View File

@ -1,5 +1,11 @@
# `@actions/upload-artifact`
> [!WARNING]
> actions/upload-artifact@v3 is scheduled for deprecation on **November 30, 2024**. [Learn more.](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/)
> Similarly, v1/v2 are scheduled for deprecation on **June 30, 2024**.
> Please update your workflow to use v4 of the artifact actions.
> This deprecation will not impact any existing versions of GitHub Enterprise Server being used by customers.
Upload [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) from your Workflow Runs. Internally powered by [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/artifact) package.
See also [download-artifact](https://github.com/actions/download-artifact).
@ -58,6 +64,7 @@ There is also a new sub-action, `actions/upload-artifact/merge`. For more info,
Due to how Artifacts are created in this new version, it is no longer possible to upload to the same named Artifact multiple times. You must either split the uploads into multiple Artifacts with different names, or only upload once. Otherwise you _will_ encounter an error.
3. Limit of Artifacts for an individual job. Each job in a workflow run now has a limit of 500 artifacts.
4. With `v4.4` and later, hidden files are excluded by default.
For assistance with breaking changes, see [MIGRATION.md](docs/MIGRATION.md).
@ -101,6 +108,12 @@ For assistance with breaking changes, see [MIGRATION.md](docs/MIGRATION.md).
# Does not fail if the artifact does not exist.
# Optional. Default is 'false'
overwrite:
# Whether to include hidden files in the provided path in the artifact
# The file contents of any hidden files in the path should be validated before
# enabled this to avoid uploading sensitive information.
# Optional. Default is 'false'
include-hidden-files:
```
### Outputs
@ -404,11 +417,33 @@ jobs:
overwrite: true
```
### Uploading Hidden Files
By default, hidden files are ignored by this action to avoid unintentionally uploading sensitive information.
If you need to upload hidden files, you can use the `include-hidden-files` input.
Any files that contain sensitive information that should not be in the uploaded artifact can be excluded
using the `path`:
```yaml
- uses: actions/upload-artifact@v4
with:
name: my-artifact
include-hidden-files: true
path: |
path/output/
!path/output/.production.env
```
Hidden files are defined as any file beginning with `.` or files within folders beginning with `.`.
On Windows, files and directories with the hidden attribute are not considered hidden files unless
they have the `.` prefix.
## Limitations
### Number of Artifacts
Within an individual job, there is a limit of 10 artifacts that can be created for that job.
Within an individual job, there is a limit of 500 artifacts that can be created for that job.
You may also be limited by Artifacts if you have exceeded your shared storage quota. Storage is calculated every 6-12 hours. See [the documentation](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending) for more info.

View File

@ -61,6 +61,20 @@ const lonelyFilePath = path.join(
'lonely-file.txt'
)
const hiddenFile = path.join(root, '.hidden-file.txt')
const fileInHiddenFolderPath = path.join(
root,
'.hidden-folder',
'folder-in-hidden-folder',
'file.txt'
)
const fileInHiddenFolderInFolderA = path.join(
root,
'folder-a',
'.hidden-folder-in-folder-a',
'file.txt'
)
describe('Search', () => {
beforeAll(async () => {
// mock all output so that there is less noise when running tests
@ -93,6 +107,14 @@ describe('Search', () => {
recursive: true
})
await fs.mkdir(
path.join(root, '.hidden-folder', 'folder-in-hidden-folder'),
{recursive: true}
)
await fs.mkdir(path.join(root, 'folder-a', '.hidden-folder-in-folder-a'), {
recursive: true
})
await fs.writeFile(searchItem1Path, 'search item1 file')
await fs.writeFile(searchItem2Path, 'search item2 file')
await fs.writeFile(searchItem3Path, 'search item3 file')
@ -110,10 +132,19 @@ describe('Search', () => {
await fs.writeFile(amazingFileInFolderHPath, 'amazing file')
await fs.writeFile(lonelyFilePath, 'all by itself')
await fs.writeFile(hiddenFile, 'hidden file')
await fs.writeFile(fileInHiddenFolderPath, 'file in hidden directory')
await fs.writeFile(fileInHiddenFolderInFolderA, 'file in hidden directory')
/*
Directory structure of files that get created:
root/
.hidden-folder/
folder-in-hidden-folder/
file.txt
folder-a/
.hidden-folder-in-folder-a/
file.txt
folder-b/
folder-c/
search-item1.txt
@ -136,6 +167,7 @@ describe('Search', () => {
folder-j/
folder-k/
lonely-file.txt
.hidden-file.txt
search-item5.txt
*/
})
@ -352,4 +384,24 @@ describe('Search', () => {
)
expect(searchResult.filesToUpload.includes(lonelyFilePath)).toEqual(true)
})
it('Hidden files ignored by default', async () => {
const searchPath = path.join(root, '**/*')
const searchResult = await findFilesToUpload(searchPath)
expect(searchResult.filesToUpload).not.toContain(hiddenFile)
expect(searchResult.filesToUpload).not.toContain(fileInHiddenFolderPath)
expect(searchResult.filesToUpload).not.toContain(
fileInHiddenFolderInFolderA
)
})
it('Hidden files included', async () => {
const searchPath = path.join(root, '**/*')
const searchResult = await findFilesToUpload(searchPath, true)
expect(searchResult.filesToUpload).toContain(hiddenFile)
expect(searchResult.filesToUpload).toContain(fileInHiddenFolderPath)
expect(searchResult.filesToUpload).toContain(fileInHiddenFolderInFolderA)
})
})

View File

@ -40,6 +40,11 @@ inputs:
If false, the action will fail if an artifact for the given name already exists.
Does not fail if the artifact does not exist.
default: 'false'
include-hidden-files:
description: >
If true, hidden files will be included in the artifact.
If false, hidden files will be excluded from the artifact.
default: 'false'
outputs:
artifact-id:

35814
dist/merge/index.js vendored

File diff suppressed because it is too large Load Diff

37668
dist/upload/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
- [Multiple uploads to the same named Artifact](#multiple-uploads-to-the-same-named-artifact)
- [Overwriting an Artifact](#overwriting-an-artifact)
- [Merging multiple artifacts](#merging-multiple-artifacts)
- [Hidden files](#hidden-files)
Several behavioral differences exist between Artifact actions `v3` and below vs `v4`. This document outlines common scenarios in `v3`, and how they would be handled in `v4`.
@ -33,6 +34,7 @@ jobs:
- name: Download All Artifacts
uses: actions/download-artifact@v3
with:
name: my-artifact
path: my-artifact
- run: ls -R my-artifact
```
@ -73,6 +75,7 @@ jobs:
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
- name: my-artifact
path: my-artifact
+ pattern: my-artifact-*
+ merge-multiple: true
@ -187,20 +190,59 @@ jobs:
- name: Create a File
run: echo "hello from ${{ matrix.runs-on }}" > file-${{ matrix.runs-on }}.txt
- name: Upload Artifact
uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
- name: all-my-files
+ name: my-artifact-${{ matrix.runs-on }}
path: file-${{ matrix.runs-on }}.txt
+ merge:
+ runs-on: ubuntu-latest
+ needs: upload
+ steps:
+ - name: Merge Artifacts
+ uses: actions/upload-artifact/merge@v4
+ with:
+ name: all-my-files
+ pattern: my-artifact-*
+ merge:
+ runs-on: ubuntu-latest
+ needs: upload
+ steps:
+ - name: Merge Artifacts
+ uses: actions/upload-artifact/merge@v4
+ with:
+ name: all-my-files
+ pattern: my-artifact-*
```
Note that this will download all artifacts to a temporary directory and reupload them as a single artifact. For more information on inputs and other use cases for `actions/upload-artifact/merge@v4`, see [the action documentation](../merge/README.md).
## Hidden Files
By default, hidden files are ignored by this action to avoid unintentionally uploading sensitive
information.
In versions of this action before v4.4.0, these hidden files were included by default.
If you need to upload hidden files, you can use the `include-hidden-files` input.
```yaml
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Create a Hidden File
run: echo "hello from a hidden file" > .hidden-file.txt
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
path: .hidden-file.txt
```
```diff
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Create a Hidden File
run: echo "hello from a hidden file" > .hidden-file.txt
- name: Upload Artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
path: .hidden-file.txt
+ include-hidden-files: true
```

View File

@ -36,6 +36,11 @@ inputs:
If true, the artifacts that were merged will be deleted.
If false, the artifacts will still exist.
default: 'false'
include-hidden-files:
description: >
If true, hidden files will be included in the merged artifact.
If false, hidden files will be excluded from the merged artifact.
default: 'false'
outputs:
artifact-id:

1272
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "upload-artifact",
"version": "4.3.0",
"version": "4.4.3",
"description": "Upload an Actions Artifact in a workflow run",
"main": "dist/upload/index.js",
"scripts": {
@ -29,10 +29,10 @@
},
"homepage": "https://github.com/actions/upload-artifact#readme",
"dependencies": {
"@actions/artifact": "^2.1.0",
"@actions/core": "^1.10.0",
"@actions/artifact": "^2.1.11",
"@actions/core": "^1.11.1",
"@actions/github": "^6.0.0",
"@actions/glob": "^0.3.0",
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.2",
"minimatch": "^9.0.3"
},

View File

@ -5,5 +5,6 @@ export enum Inputs {
SeparateDirectories = 'separate-directories',
RetentionDays = 'retention-days',
CompressionLevel = 'compression-level',
DeleteMerged = 'delete-merged'
DeleteMerged = 'delete-merged',
IncludeHiddenFiles = 'include-hidden-files'
}

View File

@ -10,6 +10,7 @@ export function getInputs(): MergeInputs {
const pattern = core.getInput(Inputs.Pattern, {required: true})
const separateDirectories = core.getBooleanInput(Inputs.SeparateDirectories)
const deleteMerged = core.getBooleanInput(Inputs.DeleteMerged)
const includeHiddenFiles = core.getBooleanInput(Inputs.IncludeHiddenFiles)
const inputs = {
name,
@ -17,7 +18,8 @@ export function getInputs(): MergeInputs {
separateDirectories,
deleteMerged,
retentionDays: 0,
compressionLevel: 6
compressionLevel: 6,
includeHiddenFiles
} as MergeInputs
const retentionDaysStr = core.getInput(Inputs.RetentionDays)

View File

@ -62,7 +62,10 @@ export async function run(): Promise<void> {
options.compressionLevel = inputs.compressionLevel
}
const searchResult = await findFilesToUpload(tmpDir)
const searchResult = await findFilesToUpload(
tmpDir,
inputs.includeHiddenFiles
)
await uploadArtifact(
inputs.name,

View File

@ -30,4 +30,9 @@ export interface MergeInputs {
* If false, the artifacts will be merged into the root of the destination.
*/
separateDirectories: boolean
/**
* Whether or not to include hidden files in the artifact
*/
includeHiddenFiles: boolean
}

View File

@ -11,11 +11,12 @@ export interface SearchResult {
rootDirectory: string
}
function getDefaultGlobOptions(): glob.GlobOptions {
function getDefaultGlobOptions(includeHiddenFiles: boolean): glob.GlobOptions {
return {
followSymbolicLinks: true,
implicitDescendants: true,
omitBrokenSymbolicLinks: true
omitBrokenSymbolicLinks: true,
excludeHiddenFiles: !includeHiddenFiles
}
}
@ -80,12 +81,12 @@ function getMultiPathLCA(searchPaths: string[]): string {
export async function findFilesToUpload(
searchPath: string,
globOptions?: glob.GlobOptions
includeHiddenFiles?: boolean
): Promise<SearchResult> {
const searchResults: string[] = []
const globber = await glob.create(
searchPath,
globOptions || getDefaultGlobOptions()
getDefaultGlobOptions(includeHiddenFiles || false)
)
const rawSearchResults: string[] = await globber.glob()

View File

@ -5,7 +5,8 @@ export enum Inputs {
IfNoFilesFound = 'if-no-files-found',
RetentionDays = 'retention-days',
CompressionLevel = 'compression-level',
Overwrite = 'overwrite'
Overwrite = 'overwrite',
IncludeHiddenFiles = 'include-hidden-files'
}
export enum NoFileOptions {

View File

@ -9,6 +9,7 @@ export function getInputs(): UploadInputs {
const name = core.getInput(Inputs.Name)
const path = core.getInput(Inputs.Path, {required: true})
const overwrite = core.getBooleanInput(Inputs.Overwrite)
const includeHiddenFiles = core.getBooleanInput(Inputs.IncludeHiddenFiles)
const ifNoFilesFound = core.getInput(Inputs.IfNoFilesFound)
const noFileBehavior: NoFileOptions = NoFileOptions[ifNoFilesFound]
@ -27,7 +28,8 @@ export function getInputs(): UploadInputs {
artifactName: name,
searchPath: path,
ifNoFilesFound: noFileBehavior,
overwrite: overwrite
overwrite: overwrite,
includeHiddenFiles: includeHiddenFiles
} as UploadInputs
const retentionDaysStr = core.getInput(Inputs.RetentionDays)

View File

@ -24,7 +24,10 @@ async function deleteArtifactIfExists(artifactName: string): Promise<void> {
export async function run(): Promise<void> {
const inputs = getInputs()
const searchResult = await findFilesToUpload(inputs.searchPath)
const searchResult = await findFilesToUpload(
inputs.searchPath,
inputs.includeHiddenFiles
)
if (searchResult.filesToUpload.length === 0) {
// No files were found, different use cases warrant different types of behavior if nothing is found
switch (inputs.ifNoFilesFound) {

View File

@ -30,4 +30,9 @@ export interface UploadInputs {
* Whether or not to replace an existing artifact with the same name
*/
overwrite: boolean
/**
* Whether or not to include hidden files in the artifact
*/
includeHiddenFiles: boolean
}