PgpSecretKeyCheck

scala.cli.commands.publish.checks.PgpSecretKeyCheck
See thePgpSecretKeyCheck companion object
final case class PgpSecretKeyCheck(options: PublishSetupOptions, coursierCache: FileCache[Task], configDb: () => ConfigDb, logger: Logger, backend: SttpBackend[Identity, Any]) extends OptionCheck

Checks if:

  • keys for signing files are present in using directives (either PGP or GPG)
  • public key is uploaded to specified keyservers (if keys present are PGP)

If any of the above fails then try the following to find missing keys:

  • if secretKey using directive is already present then fill any missing from CLI options
  • if secretKey is specified in options use only keys from options
  • if --random-secret-key is specified and it's CI use new generated keys
  • default to keys in config if this fails throw

After previous step figures out which values should be used in setup do:

  • if it's CI then upload github secrets and write using directives as 'using ci.key env:GITHUB_SECRET_VAR'
  • otherwise write down the key values to publish.conf file in the same form as they were passed to options, if the values come from config don't write them to file

Finally upload the public key to the keyservers that are specified

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait OptionCheck
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def check(pubOpt: PublishOptions): Boolean

Checks whether the option value is missing

Checks whether the option value is missing

Attributes

def defaultValue(pubOpt: PublishOptions): Either[BuildException, DefaultValue]

Provides a way to compute a default value for this option, along with extra directives and GitHub secrets to be set

Provides a way to compute a default value for this option, along with extra directives and GitHub secrets to be set

Attributes

def directivePath: String

Directive name of the option checked by this check

Directive name of the option checked by this check

Attributes

def fieldName: String

Name of the option checked, for display / reporting purposes

Name of the option checked, for display / reporting purposes

Attributes

def javaCommand: Either[BuildException, () => String]
def kind: Kind

The "group" of check this check belongs to, so that users can filter them

The "group" of check this check belongs to, so that users can filter them

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product