Skip to content

Commit

Permalink
feat: generate changelog with conventional commits
Browse files Browse the repository at this point in the history
  • Loading branch information
davdarras committed Jun 8, 2023
1 parent d9ce886 commit 3da625d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 22 deletions.
17 changes: 0 additions & 17 deletions .github/release.yml

This file was deleted.

19 changes: 17 additions & 2 deletions .github/workflows/release-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,27 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
fetch-depth: 0

- name: Get previous tag
id: previousTag
run: echo "previousTag=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | grep '^[0-9]\+\.[0-9]\+\.[0-9]\+\-rc$' | tail -1)" >> $GITHUB_OUTPUT

- name: Create release note
id: changelog
uses: requarks/changelog-action@v1
with:
fromTag: ${{ github.sha }}
toTag: ${{ steps.previousTag.outputs.previousTag}}
token: ${{ secrets.GITHUB_TOKEN }}
writeToFile: false

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.check-version.outputs.release-version }}
target_commitish: ${{ github.head_ref || github.ref }}
generate_release_notes: true
target_commitish: ${{ github.head_ref || github.ref }}
name: ${{ needs.check-version.outputs.release-version }}
body: ${{steps.changelog.outputs.changes}}
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,27 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
fetch-depth: 0

- name: Get previous tag
id: previousTag
run: echo "previousTag=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | grep '^[0-9]\+\.[0-9]\+\.[0-9]\+$' | tail -1)" >> $GITHUB_OUTPUT

- name: Create release note
id: changelog
uses: requarks/changelog-action@v1
with:
fromTag: ${{ github.sha }}
toTag: ${{ steps.previousTag.outputs.previousTag}}
token: ${{ secrets.GITHUB_TOKEN }}
writeToFile: false

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.check-version.outputs.release-version }}
target_commitish: ${{ github.head_ref || github.ref }}
generate_release_notes: true
target_commitish: ${{ github.head_ref || github.ref }}
name: ${{ needs.check-version.outputs.release-version }}
body: ${{steps.changelog.outputs.changes}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
Empty file removed CHANGELOG.md
Empty file.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "public-enemy",
"version": "2.0.1",
"version": "2.0.2",
"description": "Check and test questionnaire models",
"repository": {
"type": "git",
Expand Down

0 comments on commit 3da625d

Please sign in to comment.