-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (26 loc) · 922 Bytes
/
index.js
File metadata and controls
26 lines (26 loc) · 922 Bytes
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
const core = import('@actions/core');
const { exec } = import('@actions/exec');
const sdist = core.getBooleanInput('sdist');
const debug = core.getBooleanInput('debug');
const oziInternal = core.getBooleanInput('ozi-internal');
if (core.getInput('wheel-sign-token')) {
core.setSecret(core.getInput('wheel-sign-token'));
if (debug) core.info('wheel-sign-token will be ignored because user set debug.');
}
const build = async function(){
var args = [
'-m',
'invoke',
`--search-root=.tox/invoke/tmp/${oziInternal ? 'ozi' : 'subprojects/ozi/ozi'}`,
'release',
sdist ? ['--sdist'] : [],
core.getInput('wheel-sign-token') & !debug ? `--wheel-sign-token=${core.getInput('wheel-sign-token')}` : [],
];
try {
await exec('python', ['-m', 'pipx', 'install', 'meson']);
await exec('python', args.flat(), {silent: !debug});
} catch (error) {
core.setFailed(error.message);
}
}
build()