Skip to content

Commit

Permalink
Add version label.
Browse files Browse the repository at this point in the history
  • Loading branch information
hughack committed Dec 20, 2023
1 parent 8cfb639 commit cd70377
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jobs:
echo "Semantic Versioned tag: ${{ steps.ref_processor.outputs.is_semver_tag }}"
echo "Branch Name: ${{ steps.ref_processor.outputs.branch_name }}"
echo "Processed Branch Name: ${{ steps.ref_processor.outputs.branch_name_processed }}"
echo "Version label: ${{ steps.ref_processor.outputs.version_label }}"
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ outputs:
description: 'Unprocessed branch name, if applicable'
branch_name_processed:
description: 'Processed branch name with slashes replaced by dashes, if applicable'
version_label:
description: 'Version label, this will be the tag suffix or processed branch name.'
runs:
using: 'node20'
main: 'src/main.js'
1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function run() {
core.setOutput("tag_suffix_processed", processedTagSuffix);
core.setOutput("branch_name", branchName);
core.setOutput("branch_name_processed", branchNameProcessed);
core.setOutput("version_label", referenceType === 'tag' ? tagSuffix : branchNameProcessed);
} catch (error) {
core.setFailed(error.message);
}
Expand Down

0 comments on commit cd70377

Please sign in to comment.