Class SemverBuildVarsGitHubAction

java.lang.Object
me.julb.applications.github.actions.SemverBuildVarsGitHubAction
All Implemented Interfaces:
me.julb.sdk.github.actions.spi.GitHubActionProvider

public class SemverBuildVarsGitHubAction extends Object implements me.julb.sdk.github.actions.spi.GitHubActionProvider
The action to compute SemVer build vars.
Author:
Julb.
  • Constructor Details

    • SemverBuildVarsGitHubAction

      public SemverBuildVarsGitHubAction()
  • Method Details

    • execute

      public void execute()
      Specified by:
      execute in interface me.julb.sdk.github.actions.spi.GitHubActionProvider
    • getInputPackageVersion

      String getInputPackageVersion()
      Gets the "package_version" input.
      Returns:
      the "package_version" input.
    • getSemverVersion

      com.vdurmont.semver4j.Semver getSemverVersion(@NonNull @NonNull String version)
      Gets the semver verison object from the given version.
      Replaces a SNAPSHOT suffix by unstable suffix.
      Parameters:
      version - the version.
      Returns:
      the semver object for that version.
      Throws:
      IllegalArgumentException - if the version is not semver-valid.
    • getCurrentTimestamp

      String getCurrentTimestamp()
      Gets the current timestamp.
      Returns:
      the current timestamp formatted.