diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5ffa9d1..9d7a022 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,23 +41,22 @@ jobs: echo "::set-output name=pversion::$(python3 -c 'import __version__ ; print(__version__.__previous_version__)')" echo "::set-output name=gituser::$(python3 -c 'import os ; REPO = os.environ.get("GITHUB_REPOSITORY") ; print(str(REPO).split("/")[0])')" echo "::set-output name=gitproject::$(python3 -c 'import os ; REPO = os.environ.get("GITHUB_REPOSITORY") ; print(str(REPO).split("/")[1])')" - + echo "::set-output name=releasedate::$(date +'%d-%m-%Y')" + - name: Install Changelog autogenerator run: | - echo ${{ steps.get_version.outputs.gituser }} - echo ${{ steps.get_version.outputs.gitproject }} cd /home/runner/work/test/ sudo gem install github_changelog_generator - github_changelog_generator --user ${{ steps.get_version.outputs.gituser }} --project ${{ steps.get_version.outputs.gitproject }} --date-format "%m/%d/%Y" --header-label "# Release Notes" --output release_notes.md --token ${{ secrets.token }} --since-tag ${{ steps.get_version.outputs.pversion }} + github_changelog_generator --user ${{ steps.get_version.outputs.gituser }} --project ${{ steps.get_version.outputs.gitproject }} --date-format "%m/%d/%Y" --header-label "# Release Notes" --output release_notes.md --token ${{ secrets.token }} --since-tag ${{ steps.get_version.outputs.pversion }} --author false sed -i '$ d' release_notes.md - github_changelog_generator --user ${{ steps.get_version.outputs.gituser }} --project ${{ steps.get_version.outputs.gitproject }} --date-format "%m/%d/%Y" --token ${{ secrets.token }} + github_changelog_generator --user ${{ steps.get_version.outputs.gituser }} --project ${{ steps.get_version.outputs.gitproject }} --date-format "%m/%d/%Y" --token ${{ secrets.token }} --author false sed -i '$ d' CHANGELOG.md - name: Read CHANGELOG id: changelog run: | - release_notes=$(cat /home/runner/work/test/release_notes.md) + release_notes=$(sed -e '1,6d;' /home/runner/work/test/release_notes.md) release_notes="${release_notes//'%'/'%25'}" release_notes="${release_notes//$'\n'/'%0A'}" release_notes="${release_notes//$'\r'/'%0D'}" @@ -70,10 +69,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: - tag_name: v${{ steps.get_version.outputs.version }} - release_name: v${{ steps.get_version.outputs.version }} + tag_name: ${{ steps.get_version.outputs.version }} + release_name: ${{ steps.get_version.outputs.version }} body: | ![CDNJS](https://img.shields.io/badge/Gluu-4.2-green) + # Release Notes + + ## [${{ steps.get_version.outputs.version }}](https://github.com/${{ steps.get_version.outputs.gituser }}/${{ steps.get_version.outputs.gitproject }}/tree/${{ steps.get_version.outputs.version }}) (${{ steps.get_version.outputs.releasedate }}) + + [Full Changelog](https://github.com/${{ steps.get_version.outputs.gituser }}/${{ steps.get_version.outputs.gitproject }}/compare/${{ steps.get_version.outputs.pversion }}...${{ steps.get_version.outputs.version }}) + + ${{ steps.changelog.outputs.body }} draft: false prerelease: false diff --git a/__version__.py b/__version__.py index 5f46e15..2ca466e 100644 --- a/__version__.py +++ b/__version__.py @@ -5,4 +5,3 @@ """ __version__ = "4.2.0_01" __previous_version__ = "4.2.0" -