Test #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
fetch-depth: 0 | |
- name: Get previous tag | |
id: get_previous_tag | |
run: | | |
echo "PREV_TSG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))">>$GITHUB_ENV | |
echo "CURR_TAG=$(git describe --abbrev=0 --tags)">>$GITHUB_ENV | |
- name: Generate changelog | |
id: generate_changelog | |
run: | | |
echo "Previous tag: $PREV_TAG" | |
echo "Last tag: $LAST_TAG" | |
FULL_CHANGELOG="**Full Changelog**: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/compare/$PREV_TAG...$CURR_TAG" | |
COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"%h %s (%an, %ar)") | |
echo -e "changelog=$COMMITS\n$FULL_CHANGELOG" >> $GITHUB_ENV | |
- run: echo $changelog |