Skip to content

Commit

Permalink
fix: github action release calculate-tag step
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-form3 committed Oct 24, 2023
1 parent 81a9a14 commit edd73a8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/calculate-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,22 @@ jobs:
fi
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
- name: Calculate pre-release suffix
id: tag-suffix
id: tag_suffix
run: |
echo "event name ${{ github.event_name }}"
SUFFIX="${{ inputs.head_ref }}"
if [[ "${{ github.event_name }}" = "push" && "${{ github.ref_type }}" = "branch" && "${{ github.ref_name }}" = "builder" ]]; then
if [[ "${{ github.event_name }}" = "push" && "${{ github.ref_type }}" = "branch" ]]; then
SUFFIX="release-$(date +%Y-%m-%d)"
fi
underscores_and_slashes_to_dashes_suffix="${SUFFIX//[\/_]/-}"
echo "tag-suffix=-${underscores_and_slashes_to_dashes_suffix}" >> $GITHUB_OUTPUT
echo "tag_suffix=-${underscores_and_slashes_to_dashes_suffix}" >> $GITHUB_OUTPUT
- name: Compute next tag
id: tag
run: |
latest_tag="${{ steps.latest_tag.outputs.latest_tag }}"
tag="${latest_tag}-f3${{steps.tag-suffix.outputs.tag-suffix}}"
if [[ "${{ github.ref_type }}" = "tag" ]]; then
tag="${latest_tag}
else
tag="${latest_tag}${{steps.tag_suffix.outputs.tag_suffix}}"
fi
echo "tag=$tag" >> $GITHUB_OUTPUT

0 comments on commit edd73a8

Please sign in to comment.