Skip to content

salt-labs/action-its-shipping-time

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Readme

Table of Contents

Workflow Status

Status Description
Dependabot Automated dependency updates
Greetings Greets new users to the project.
Docker Testing and building containers with Docker
Labeler Automates label addition to issues and PRs
Release Ships new releases 🚢
Stale Checks for Stale issues and PRs

Description

A GitHub Action to prepare for shipping time. 🚢

This is a simple and opinionated Action that works by automating release tags using a Calendar Versioning scheme.

The Action can also generate a basic Changelog between HEAD and the last applied tag.

The outputs from this Action can then be used to pass to actions/create-release.

Inputs

The following inputs are available:

Input Required Description Default Examples
log_level False Sets the log level for debugging purposes INFO DEBUG
INFO
WARN
ERR
tag_enable False Enable to apply a git tag. Disable if you just want release notes output. FALSE TRUE
FALSE
tag_force False Enable to force applying the tag. This will move a past tag if there was a CalVer scheme collision.

When disabled an error will not be thrown so the build will pass, there will just be no new tag applied.
FALSE TRUE
FALSE
git_pretty_format False The format to provide to git log --pretty * %G? %h %aN %s"
calver_scheme False The CalVer scheme to use. Refer to the details below. YYYY.0M.0D-GEN YYYY.0M.0D-GEN-dev
calver_split False The separator to use between MAJOR MINOR MICRO MODIFIER . - .
calver_split_mod False The separator to use between MICRO and MODIFIER.

Defaults to the same as calver_split
. - .
timezone False The timezone to export the CalVer in UTC-0 Examples

Outputs

The following outputs are available:

Output Description Example
changelog A Changelog between HEAD and the last tag * This is an amazing commit message
calver Calendar Version generated in the provided scheme 2020.05.01-alpha
repo_owner The GitHub repository organisation or owner salt-labs
repo_name The GitHub repository name action-its-shipping-time

Secrets

The following secrets are used by the Action:

Secret Description Example
GITHUB_TOKEN The GitHub Token to push the modified tags ${{secrets.GITHUB_TOKEN}}

Environment Variable

  • None

Example

Refer to the included examples directory.

Further Information

Calendar Versioning Scheme

The CalVer scheme is summarised as follows: MAJOR.MINOR.MICRO.MODIFIER

  • Major - The first number in the version. The major segment is the most common calendar-based component.
  • Minor - The second number in the version.
  • Micro - The third and usually final number in the version. Sometimes referred to as the "patch" segment.
  • Modifier - An optional text tag or revision number, such as "dev", "alpha", "beta", "rc1", "3".

The vast majority of modern version identifiers are composed of two or three numeric segments, plus the optional modifier. Convention suggests that four-numeric-segment versions are discouraged.

Available options

  • YYYY - Full year - 2006, 2016, 2106
  • YY - Short year - 6, 16, 106
  • 0Y - Zero-padded year - 06, 16, 106
  • MM - Short month - 1, 2 ... 11, 12
  • 0M - Zero-padded month - 01, 02 ... 11, 12
  • WW - Short week (since start of year) - 1, 2, 33, 52
  • 0W - Zero-padded week - 01, 02, 33, 52
  • DD - Short day - 1, 2 ... 30, 31
  • 0D - Zero-padded day - 01, 02 ... 30, 31
  • GEN - Increment a number based on the last found Git tag for this numeric segment.

Examples

Syntax Output
YYYY.MM.GEN 2020.6.1
YYYY.0D.0M-GEN 2020.25.05-1
YYYY.0D.GEN 2020.25.1
YY-MM-0W 20-5-21
YY-MM-0W.GEN 20-5-21.1
YY.MM-GEN 20.5-1

TimeZones

A list of available TZ Database time zones are available HERE.