Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
tag

GitHub Action

jjversion-action

v0.6.6

jjversion-action

tag

jjversion-action

Creates a version for the repository using jjversion

Installation

Copy and paste the following snippet into your .yml file.

              

- name: jjversion-action

uses: jjliggett/[email protected]

Learn more about this action in jjliggett/jjversion-action

Choose a version

jjversion-action

jjversion-action is a composite GitHub action that uses the Go package jjliggett/jjversion to calculate a version for a git repository and parse version attributes as GitHub Action outputs.

Usage

For this action to work properly, you must create a versioning.yaml file in your repository and checkout your repository in your workflow with fetch-depth: 0 to fetch all history for all tags and branches. Configuration information for the versioning.yaml file can be found in the https://github.com/jjliggett/jjversion repository.

Outputs

The action creates the following outputs:

  • major
  • minor
  • patch
  • majorMinorPatch
  • sha
  • shortSha

Example Usage

An example usage can be seen below:

    steps:
      - name: Checkout
        uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
        with:
          fetch-depth: 0
      - name: Get version
        id: jjversion
        uses: jjliggett/jjversion-action@ce54a38a5fae3f0f2a96acc046b68c66d3822042
      - name: Display jjversion outputs
        run: |
          echo "Major: ${{ steps.jjversion.outputs.major }}"
          echo "Minor: ${{ steps.jjversion.outputs.minor }}"
          echo "Patch: ${{ steps.jjversion.outputs.patch }}"
          echo "MajorMinorPatch: ${{ steps.jjversion.outputs.majorMinorPatch }}"
          echo "Sha: ${{ steps.jjversion.outputs.sha }}"
          echo "ShortSha: ${{ steps.jjversion.outputs.shortSha }}"

Licensing

Licensing can be found at: LICENSE.md.

The jjversion-action license applies to all parts of jjversion-action that are not externally maintained libraries and dependencies.

The primary dependency of jjversion-action is jjversion-gha-output, located at https://github.com/jjliggett/jjversion-gha-output. Its license can be found in that repository. This action downloads a GitHub Release executable binary from the jjliggett/jjversion-gha-output repository and executes it.

Another core dependency of jjversion-action is jjversion, which is a dependency of jjversion-gha-output. This is located at https://github.com/jjliggett/jjversion. Its license and the licenses for its dependencies can be found in the jjversion repository.

In addition, a GitHub action is used within workflows for the repository: