Skip to content

Commit

Permalink
#25 use changelog builder so that can pass from and to tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kasramp committed Apr 30, 2023
1 parent e415bf0 commit 7c3fd4b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 23 deletions.
30 changes: 30 additions & 0 deletions .github/release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"categories": [
{
"title": "## New Features 🎉",
"labels": [
"new feature"
]
},
{
"title": "## Improvements 🛠",
"labels": [
"improvement"
]
},
{
"title": "## Bug Fixes 🐞",
"labels": [
"bug"
]
},
{
"title": "## Other Changes ☕",
"labels": [
"*"
]
}
],
"max_pull_requests": 1000,
"max_back_track_time_days": 1000
}
21 changes: 0 additions & 21 deletions .github/release.yml

This file was deleted.

14 changes: 12 additions & 2 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
run: |
echo "::set-output name=LAST_COMMIT::$(git log -n 1)"
id: version
- name: Get previous tagged version
id: previous_tagged_version
if: ${{ github.ref == 'refs/heads/master' }}
shell: bash
run: |
echo "::set-output name=OLD_TAGGED_VERSION::$(git for-each-ref --sort=-creatordate --format='%(refname:short)' refs/tags --count 10 | grep -oP '^eris-(\d+).*' | head -1)"
- name: Tag
shell: bash
env:
Expand All @@ -53,17 +59,21 @@ jobs:
./${GIHUB_WORKSPACE}/util/release.sh
- name: Get latest tagged version
id: tagged_version
if: ${{ github.ref == 'refs/heads/master' }}
shell: bash
run: |
echo "::set-output name=TAGGED_VERSION::$(git for-each-ref --sort=-creatordate --format='%(refname:short)' refs/tags --count 10 | grep -oP '^eris-(\d+).*' | head -1)"
- name: Generate release note
uses: release-drafter/release-[email protected]
uses: mikepenz/release-changelog-builder-action@@v3.7.1
id: release_note
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config-name: release.yml
owner: "kasramp"
config-name: ".github/release.json"
fromTag: ${{ steps.previous_tagged_version.outputs.OLD_TAGGED_VERSION }}
toTag: ${{ steps.tagged_version.outputs.TAGGED_VERSION }}
- name: Perform release
uses: softprops/action-gh-release@v1
if: ${{ github.ref == 'refs/heads/master' }}
Expand Down

0 comments on commit 7c3fd4b

Please sign in to comment.