Skip to content

Commit

Permalink
chore(ci): fix processing of generated file name
Browse files Browse the repository at this point in the history
  • Loading branch information
pcfreak30 committed Nov 1, 2024
1 parent 7571645 commit 15efd1d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/changeset-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ jobs:
title=""
for i in {1..3}; do
index=$((RANDOM % size))
title="$title ${words[$index]}"
title="$title-${words[$index]}"
done
echo "title=${title## }" >> $GITHUB_OUTPUT
# Remove leading dash and output
title=${title#-}
echo "title=${title}" >> $GITHUB_OUTPUT
- name: Get Package Version
id: package-version
Expand All @@ -50,15 +52,13 @@ jobs:
echo "name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
- name: Create Changelog Entry
shell: bash
run: |
mkdir -p .changeset
cat << EOF > .changeset/${{ steps.random-title.outputs.title }}.md
---
"${{ steps.package-version.outputs.name }}": ${{ inputs.type }}
---
${{ inputs.description }}
EOF
printf -- "---\n\"%s\": %s\n---\n\n%s\n" \
"${{ steps.package-version.outputs.name }}" \
"${{ inputs.type }}" \
"${{ inputs.description }}" > ".changeset/${{ steps.random-title.outputs.title }}.md"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
Expand Down

0 comments on commit 15efd1d

Please sign in to comment.