Skip to content

changelog print test #3

changelog print test

changelog print test #3

Workflow file for this run

name: changelog print test
on:
workflow_dispatch:
jobs:
test-git-logs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get commit messages since last tag
id: release_notes
run: |
git fetch --tags
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -z "$LAST_TAG" ]; then
git log --pretty=format:"%s %h" > changelog.txt
else
git log ${LAST_TAG}..HEAD --pretty=format:"%s %h" > changelog.txt
fi
- name: print changelog
run: cat changelog.txt