olabusayoT commented on code in PR #20:
URL:
https://github.com/apache/daffodil-infrastructure/pull/20#discussion_r2500737396
##########
actions/release-candidate/dist/main/index.js:
##########
@@ -31855,46 +31855,97 @@ async function run() {
const tlp_dir = core.getInput("tlp_dir", { required: true });
const project_id = core.getInput("project_id", { required: true
});
const project_dir = core.getInput("project_dir");
- const gpg_signing_key = core.getInput("gpg_signing_key", {
required: true });
- const svn_username = core.getInput("svn_username", { required:
true });
- const svn_password = core.getInput("svn_password", { required:
true });
- const nexus_username = core.getInput("nexus_username", {
required: true });
- const nexus_password = core.getInput("nexus_password", {
required: true });
- let publish = core.getBooleanInput("publish");
+ const publish = core.getBooleanInput("publish");
+ let gpg_signing_key = "";
+ let gpg_signing_public_key = "";
+ let gpg_signing_key_id = "";
+ const gitTagPrefix = "refs/tags/";
+ // get the actual project version, this requires a 'VERSION'
file at
+ // the root of the repository
+ const project_version =
fs.readFileSync("VERSION").toString().trim();
+ const is_snapshot = project_version.includes("-SNAPSHOT");
+ const do_publish =
+ // Note that publishing could be disabled if the
publish input was explicitly set
+ // to false
+ publish
+ // enable publishing for tags
+ && (github.context.eventName == "push" &&
github.context.ref.startsWith(gitTagPrefix))
+ // enable publishing for non-snapshot builds and ASF
builds.
+ && (!is_snapshot && process.env.GITHUB_REPOSITORY_OWNER
== "apache")
+
+ if (do_publish) {
+ gpg_signing_key = core.getInput("gpg_signing_key",
{required: true});
+ }
+
+ if (gpg_signing_key.trim() === "") {
+ // Generate keypair (non-interactive)
+ await exec("gpg", ["--batch", "--yes", "--passphrase",
'', "--quick-generate-key", process.env.USER ]);
Review Comment:
Yes quick-generate-key creates but doesn't output, so we need to list to get
the id
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]