mirror of
https://github.com/lukaszraczylo/shared-actions.git
synced 2026-06-09 23:03:54 +00:00
Utilise composite workflows.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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}"
|
||||
Reference in New Issue
Block a user