Arguments class

Comprehensive GitHub Releases arguments for automated app distribution.

Extends PublisherArguments to provide GitHub-specific configuration for distributing applications through GitHub repository releases. Supports advanced features like release management, asset uploads, and repository integration.

Key capabilities:

  • GitHub API integration
  • Release creation and management
  • Asset upload and organization
  • Authentication and security
  • File and directory processing
  • Error handling and recovery

Example usage:

final args = Arguments(
  variables,
  filePath: '/path/to/app.apk',
  binaryType: 'apk',
  repoOwner: 'flutter-org',
  repoName: 'my-flutter-app',
  token: 'ghp_xxxxxxxxxxxxxxxxxxxx',
  releaseName: 'v1.0.0-beta.1',
  releaseBody: 'Beta release with new features',
);
Inheritance

Constructors

Arguments(Variables variables, {required String filePath, required String binaryType, required String repoName, required String repoOwner, required String token, required String releaseName, String releaseBody = "", bool draft = false, bool prerelease = false, String? targetCommitish})
Creates a new GitHub Releases publisher arguments instance.
Arguments.defaultConfigs(ArgResults? globalResults)
Creates default GitHub configuration for basic usage.
factory
Arguments.fromArgResults(ArgResults argResults, ArgResults? globalResults)
Creates Arguments instance from command-line arguments.
factory
Arguments.fromJson(Map<String, dynamic> json, {required Variables variables})
Creates Arguments instance from JSON configuration.
factory

Properties

argumentBuilder List<String>
Builds the command arguments list (not used for GitHub API).
getter/setter pairinherited-setteroverride-getter
arguments Future<List<String>>
Processes variables in arguments and returns the final command-line arguments.
no setterinherited
binaryType String
The type of application binary being published.
finalinherited
draft bool
Whether a newly created release is kept as an unpublished draft.
getter/setter pair
filePath String
The file system path to the application binary to be published.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
logger ColorizeLogger
Logger instance for outputting colored messages.
getter/setter pairinherited
packageNameOverride String?
Application identifier explicitly provided for this publisher.
getter/setter pairinherited
parent PublisherJob?
Reference to the parent publisher job that contains this publisher.
getter/setter pairinherited
prerelease bool
Whether a newly created release is flagged as a pre-release.
getter/setter pair
publisher String
The name identifier of the publisher platform.
finalinherited
releaseBody String
Descriptive text content for the release.
getter/setter pair
releaseName String
Name or tag for the GitHub release.
getter/setter pair
repoName String
GitHub repository name for release publishing.
getter/setter pair
repoOwner String
GitHub repository owner or organization name.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretKeys Set<String>
Credentials that must never be printed or written to the log file.
no setteroverride
targetCommitish String?
Git commit-ish the release tag is created from.
getter/setter pair
token String
GitHub personal access token for API authentication.
getter/setter pair
variables Variables
Variable processor for substituting placeholders in arguments.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printJob() Future
Prints the resolved configuration of a job.
inherited
processFilesArgs() Future<void>
Processes and validates file arguments before publishing.
inherited
publish() Future<int>
Executes the GitHub Releases publishing workflow.
override
registerSecrets() Future<void>
Resolves every secret value and registers it with the logger.
inherited
resolvePackageName() String
The application identifier this publisher should target.
inherited
runProcess(List<String> arguments) Future<int>
Runs the publisher executable with arguments and streams its output.
inherited
toJson() Map<String, dynamic>
Serializes Arguments instance to JSON format.
override
toString() String
A string representation of this object.
inherited
uploadFile(String uploadUrl, File file) Future<String?>
Uploads a file as a release asset to GitHub.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

parser ↔ ArgParser
Command-line argument parser for GitHub Releases publisher.
getter/setter pair