verify method
Checks that a CI ref matches the configured target version.
Implementation
Future<String> verify(String targetName) async {
final target = config.target(targetName);
final version = await readPubspecVersion(
target.versionPath(config.repoRoot),
);
final expected = target.renderTag(version);
final actual = context.environment['GITHUB_REF_NAME'];
if (actual != expected) {
throw ShipworldException(
'Tag ${actual ?? '(missing)'} does not match $targetName version '
'$expected',
code: 'tag_mismatch',
);
}
return expected;
}