forked from Gusto/semantic-release-rubygem
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
36 lines (29 loc) · 832 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* eslint require-atomic-updates: off */
import { temporaryFile } from "tempy";
import gemVerify from "./lib/verify.js";
import gemPrepare from "./lib/prepare.js";
import gemPublish from "./lib/publish.js";
const credentialsFile = temporaryFile({ name: "gem_credentials" });
let versionFile;
let gemName;
let gemSpec;
let gemFile;
export async function verifyConditions(pluginConfig, context) {
({ gemName, gemSpec, versionFile } = await gemVerify(pluginConfig, context, {
credentialsFile,
}));
}
export async function prepare(pluginConfig, context) {
({ gemFile } = await gemPrepare(pluginConfig, context, {
versionFile,
gemSpec,
gemName,
}));
}
export async function publish(pluginConfig, context) {
await gemPublish(pluginConfig, context, {
gemFile,
gemName,
credentialsFile,
});
}