mirror of
https://github.com/lukaszraczylo/shared-actions.git
synced 2026-06-05 22:43:43 +00:00
36 lines
957 B
YAML
36 lines
957 B
YAML
name: "Semantic Version"
|
|
description: "Calculate semantic version using semver-generator"
|
|
|
|
inputs:
|
|
config-file:
|
|
description: "Path to semver config file"
|
|
required: false
|
|
default: "semver.yaml"
|
|
|
|
outputs:
|
|
version:
|
|
description: "The calculated version (without v prefix)"
|
|
value: ${{ steps.format.outputs.version }}
|
|
version_tag:
|
|
description: "The version tag (with v prefix)"
|
|
value: ${{ steps.format.outputs.version_tag }}
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Calculate version
|
|
id: semver
|
|
uses: lukaszraczylo/semver-generator@v1
|
|
with:
|
|
config_file: ${{ inputs.config-file }}
|
|
repository_local: true
|
|
|
|
- name: Format version
|
|
id: format
|
|
shell: bash
|
|
run: |
|
|
VERSION="${{ steps.semver.outputs.semantic_version }}"
|
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
echo "version_tag=v${VERSION}" >> $GITHUB_OUTPUT
|
|
echo "Version: v${VERSION}"
|