Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
moabu committed Aug 11, 2020
1 parent 3cd6b99 commit 4b66971
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'}"
Expand All @@ -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
1 change: 0 additions & 1 deletion __version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
"""
__version__ = "4.2.0_01"
__previous_version__ = "4.2.0"

0 comments on commit 4b66971

Please sign in to comment.