Skip to content

Commit

Permalink
create changelog based on latest commits
Browse files Browse the repository at this point in the history
  • Loading branch information
firsttris committed Dec 29, 2023
1 parent 901eb69 commit 14f47b0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/scripts/get_commits.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Set GIT_PAGER to cat to disable paging
export GIT_PAGER=cat

# Get the last release tag
tag=$(curl --silent "https://api.github.com/repos/firsttris/ccu-addon-mui/releases/latest" | jq -r .tag_name)

# Get the SHA of the last release
sha=$(git rev-list -n 1 $tag)

# Get the commits since the last release
git log --pretty=format:"%h %s" $sha..HEAD
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,17 @@ jobs:
- name: Get version
id: packagejson
uses: martinbeentjes/npm-get-version-action@v1.3.1

- name: Create Changelog with commits since last release
run: |
chmod +x ./.github/scripts/get_commits.sh
./.github/scripts/get_commits.sh > commit_log.txt
- name: Upload Release
uses: ncipollo/release-action@v1.13.0
with:
artifacts: 'mui-${{ steps.packagejson.outputs.current-version }}.tar.gz'
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.packagejson.outputs.current-version }}
bodyFile: commit_log.txt

0 comments on commit 14f47b0

Please sign in to comment.