Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
BoiHanny authored May 16, 2024
1 parent 794a6c2 commit 5687c23
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,22 @@ jobs:
}
shell: pwsh

- name: Get Latest Tag
id: get_latest_tag
uses: actions-ecosystem/action-get-latest-tag@v1
with:
tag: 'v*'

- name: Get Commits Since Last Release
id: get_commits
uses: simbo/[email protected]
run: |
latest_tag=${{ steps.get_latest_tag.outputs.tag }}
if [ -z "$latest_tag" ]; then
latest_tag=$(git rev-list --max-parents=0 HEAD)
fi
git log $latest_tag..HEAD --oneline > commits.txt
commits=$(cat commits.txt)
echo "COMMITS=${commits}" >> $GITHUB_ENV
- name: Create Release
id: create_release
Expand Down Expand Up @@ -142,7 +155,7 @@ jobs:
</div>
<ul>
${{ steps.get_commits.outputs.log }}
${{ env.COMMITS }}
</ul>
<hr>
Expand Down

0 comments on commit 5687c23

Please sign in to comment.