feat: add release workflow (#2)
This commit is contained in:
11
src/index.ts
11
src/index.ts
@@ -1,9 +1,18 @@
|
||||
import { install } from "./stages/install";
|
||||
import { configure } from "./stages/configure";
|
||||
import { push } from "./stages/push.ts";
|
||||
import { getState, saveState } from "@actions/core";
|
||||
|
||||
const isPost = !!getState("isPost");
|
||||
|
||||
const main = async () => {
|
||||
await install();
|
||||
await configure();
|
||||
};
|
||||
|
||||
main();
|
||||
if (!isPost) {
|
||||
saveState("isPost", true);
|
||||
main();
|
||||
} else {
|
||||
push();
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { push } from "./stages/push";
|
||||
|
||||
const main = async () => {
|
||||
await push();
|
||||
};
|
||||
|
||||
main();
|
||||
@@ -16,7 +16,6 @@ export const install = async () => {
|
||||
if (!r.ok) {
|
||||
core.setFailed(`Action failed with error: ${r.statusText}`);
|
||||
core.endGroup();
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user