Skip to content

Commit

Permalink
Update PR title with full release tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelburnham committed Sep 24, 2024
1 parent 4e85821 commit 9c6136f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/actions/release-pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ runs:
echo "PR_BRANCH=$PR_BRANCH" | tee -a $GITHUB_ENV
if [[ -n "${{ inputs.path }}" ]]; then
echo "PR_TITLE=chore(${{ inputs.path }}): Release ${{ env.CRATE_VERSION }}" | tee -a $GITHUB_ENV
echo "PR_TITLE=chore(${{ inputs.path }}): Release `${{ env.TAG_PREFIX }}${{ env.CRATE_VERSION }}`" | tee -a $GITHUB_ENV
else
echo "PR_TITLE=chore: Release ${{ env.CRATE_VERSION }}" | tee -a $GITHUB_ENV
echo "PR_TITLE=chore: Release `${{ env.TAG_PREFIX }}${{ env.CRATE_VERSION }}`" | tee -a $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ inputs.token }}
Expand Down
18 changes: 9 additions & 9 deletions .github/actions/tag-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
description: 'Branch to release'
required: true
version:
description: 'SemVer release version'
description: 'SemVer release version, e.g. `1.0.0`'
required: true
tag-prefix:
description: 'Tag prefix used to get most recent release'
Expand All @@ -30,20 +30,20 @@ inputs:
runs:
using: "composite"
steps:
- name: Get version
id: get-version
- name: Get release tag
id: get-tag
run: |
if [[ -n "${{ inputs.tag-prefix }}" ]]; then
TAG_PREFIX="${{ inputs.tag-prefix }}-"
else
TAG_PREFIX=""
fi
TAG_VERSION=${TAG_PREFIX}v${{ inputs.version }}
RELEASE_TAG=${TAG_PREFIX}v${{ inputs.version }}
git tag -a $TAG_VERSION -m "$TAG_VERSION" origin/${{ inputs.release-branch }}
git push origin $TAG_VERSION --follow-tags
echo "tag-version=$TAG_VERSION" | tee -a "$GITHUB_OUTPUT"
git tag -a $RELEASE_TAG -m "$RELEASE_TAG" origin/${{ inputs.release-branch }}
git push origin $RELEASE_TAG --follow-tags
echo "release-tag=$RELEASE_TAG" | tee -a "$GITHUB_OUTPUT"
shell: bash

- name: Get latest release reference
Expand Down Expand Up @@ -73,14 +73,14 @@ runs:
configuration: ${{ inputs.changelog-config-file }}
path: "./${{ inputs.changelog-path }}"
fromTag: ${{ steps.get-latest-release.outputs.latest_release }}
toTag: ${{ steps.get-version.outputs.tag-version }}
toTag: ${{ steps.get-tag.outputs.release-tag }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Create Release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.github_release.outputs.changelog }}
tag: ${{ steps.get-version.outputs.tag-version }}
tag: ${{ steps.get-tag.outputs.release-tag }}
commit: ${{ inputs.release-branch }}
allowUpdates: true

0 comments on commit 9c6136f

Please sign in to comment.