From 7a4ae274964460cd327b12234cd5cdb778587405 Mon Sep 17 00:00:00 2001 From: shimataro Date: Sun, 18 Dec 2022 08:21:32 +0900 Subject: [PATCH] save state --- lib/index.js | 7 +++++++ src/main.ts | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/index.js b/lib/index.js index d668a03..da4e0a9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2741,6 +2741,7 @@ catch (err) { function main() { if (!isPost()) { setup(); + setPost(); } else { cleanup(); @@ -2753,6 +2754,12 @@ function main() { function isPost() { return Boolean(core.getState("isPost")); } +/** + * update post state + */ +function setPost() { + core.saveState("isPost", "true"); +} /** * setup function */ diff --git a/src/main.ts b/src/main.ts index b6ce5cd..962c239 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,6 +27,7 @@ try { function main(): void { if (!isPost()) { setup(); + setPost(); } else { cleanup(); } @@ -40,6 +41,13 @@ function isPost(): boolean { return Boolean(core.getState("isPost")); } +/** + * update post state + */ +function setPost(): void { + core.saveState("isPost", "true"); +} + /** * setup function */