Skip to content

Commit

Permalink
Multi-line + commit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvi committed Jun 21, 2024
1 parent e509d27 commit 18e9cfa
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,31 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DRAFT_RELEASE=$(gh api repos/${{ github.repository }}/releases -q '[.[] | select(.draft==true)] | first')
DRAFT_NOTES=$(echo $DRAFT_RELEASE | jq -r '.body' | jq -Rs .)
DRAFT_NOTES=$(echo $DRAFT_RELEASE | jq -r '.body')
DRAFT_ID=$(echo $DRAFT_RELEASE | jq -r '.id')
echo "notes=$DRAFT_NOTES" >> $GITHUB_OUTPUT
# Write the draft notes to a temporary file to handle multiline output
echo "$DRAFT_NOTES" > draft_notes.txt
# Set the output using the temporary file
echo "notes<<EOF" >> $GITHUB_OUTPUT
cat draft_notes.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
gh api repos/${{ github.repository }}/releases/$DRAFT_ID -X DELETE

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
env:
UPCOMING_VERSION: $(bump-my-version show --increment ${{ github.event.inputs.version_bump }} new_version)
with:
latest-version: $(bump-my-version show --increment ${{ github.event.inputs.version_bump }} new_version)
latest-version: $UPCOMING_VERSION
release-notes: ${{ steps.fetch_release_notes.outputs.notes }}

- name: Bump version
run: bump-my-version bump ${{ github.event.inputs.version_bump }} -v
run: |
git config --global user.name 'HDate - release bot'
git config --global user.email 'hdate-release+github-actions@github.com'
bump-my-version bump ${{ github.event.inputs.version_bump }} -v
- name: Create GitHub Release
env:
Expand Down

0 comments on commit 18e9cfa

Please sign in to comment.