diff --git a/.github/main.workflow b/.github/main.workflow index 99b3568e..cf141b0f 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -23,7 +23,7 @@ action "Compile" { action "Format" { needs = "Dependencies" uses = "actions/npm@v2.0.0" - args = "run format" + args = "run format-check" } action "Test" { diff --git a/docs/package-specs.md b/docs/package-specs.md index 76dcecf4..b318251e 100644 --- a/docs/package-specs.md +++ b/docs/package-specs.md @@ -12,6 +12,14 @@ export function debug(message: string): void export function warning(message: string): void export function error(message: string): void +/** + * Interface for exportVariable options + */ +export interface ExportOptions { + /** Optional. Whether the variable should be marked as secret (will be masked from logs). Defaults to false */ + isSecret?: bool; +} + /** * sets env variable for this action and future actions in the job * @@ -19,17 +27,7 @@ export function error(message: string): void * @param val the value of the variable * @param options optional. See ExportOptions. */ -export function exportVariable(name: string, val: string): void - -/** - * exports the variable and registers a secret which will get masked from logs - * @param name the name of the variable to set - * @param val value of the secret - */ -export function exportSecret(name: string, val: string) { - exportVariable(name, val); - intm._issueCommand('set-secret', {}, val); -} +export function exportVariable(name: string, val: string, options?: ExportOptions): void /** * Interface for getInput options diff --git a/package.json b/package.json index edd9d2f7..27b27b44 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "scripts": { "bootstrap": "lerna bootstrap", "build": "lerna run tsc", - "format": "prettier --check packages/**/*.ts", + "format": "prettier --write packages/**/*.ts", + "format-check": "prettier --check packages/**/*.ts", "new-package": "scripts/create-package", "test": "jest" },