Add an option to specify retention days for artifacts (#575)

* Add an option to specify retention days for artifacts

* Validate against settings exposed as env var to give early feedback

* Fix lint

* Add tests and addressing feedback

* Update packages/artifact/__tests__/upload.test.ts

Co-authored-by: Konrad Pabjan <konradpabjan@github.com>

* Update packages/artifact/README.md

Co-authored-by: Konrad Pabjan <konradpabjan@github.com>

* Update packages/artifact/src/internal/utils.ts

Co-authored-by: Konrad Pabjan <konradpabjan@github.com>

* Update packages/artifact/__tests__/util.test.ts

Co-authored-by: Konrad Pabjan <konradpabjan@github.com>

Co-authored-by: Konrad Pabjan <konradpabjan@github.com>
This commit is contained in:
Yang CaoandKonrad Pabjan authored and GitHub committed 2020-09-18 11:30:00 -04:00
1 parent 5d7c069a8e
commit da436eaab9
10 files changed
+97 -5

No files matched your search

+4
View File
@@ -61,3 +61,7 @@ export function getWorkSpaceDirectory(): string {
}
return workspaceDirectory
}
export function getRetentionDays(): string | undefined {
return process.env['GITHUB_RETENTION_DAYS']
}