Test #1
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 | |
- name: Get previous tag | |
id: get_previous_tag | |
run: | | |
echo "::set-output name=prev::$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" | |
echo "::set-output name=curr::$(git describe --abbrev=0 --tags)" | |
- name: Generate changelog | |
id: generate_changelog | |
run: | | |
PREV_TAG=${{ steps.get_previous_tag.outputs.prev }} | |
CURR_TAG=${{ steps.get_previous_tag.outputs.curr }} | |
echo "Last tag: $PREV_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 "::set-output name=changelog::$COMMITS\n$FULL_CHANGELOG" | |
- run: echo ${{ steps.generate_changelog.outputs.changelog}} |