From 7f0c9eaa6d0a13c28f59b6f792479ea9052ba3f3 Mon Sep 17 00:00:00 2001 From: initdc Date: Sat, 15 Oct 2022 13:44:59 +0000 Subject: [PATCH] fix: update actions.yml --- action.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 94a583a..1d21f6f 100644 --- a/action.yml +++ b/action.yml @@ -3,8 +3,8 @@ description: 'Upload a build artifact that can be used by subsequent workflow st author: 'GitHub' inputs: name: - description: 'Artifact name' - default: 'artifact' + description: 'Artifacts name' + default: 'artifacts' path: description: 'A file, directory or wildcard pattern that describes what to upload' required: true @@ -23,6 +23,31 @@ inputs: Minimum 1 day. Maximum 90 days unless changed from the repository settings page. + artifact-per-file: + description: enable otption for uploading one artifact per file + default: "false" + artifact-name-rule: + description: > + https://nodejs.org/docs/latest-v16.x/api/path.html#pathparsepath + + path.parse('/home/user/dir/file.txt'); + // Returns: + // { root: '/', + // dir: '/home/user/dir', + // base: 'file.txt', + // ext: '.txt', + // name: 'file' } + + ┌─────────────────────┬────────────┐ + │ dir │ base │ + ├──────┬ ├──────┬─────┤ + │ root │ │ name │ ext │ + " / home/user/dir / file .txt " + └──────┴──────────────┴──────┴─────┘ + (All spaces in the "" line should be ignored. They are purely for formatting.) + + Every key need in wrapper: ${} + default: ${base} runs: using: 'node16' main: 'dist/index.js'