Skip to content

Commit

Permalink
ci: use home brew changelog builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Bambooin committed Jun 19, 2021
1 parent 84a3793 commit 18b6b95
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,30 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout last commit
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'recursive'

- name: Archive config
- name: Archive rimerc
run: make archive

- name: Build changelog
id: relase_log
uses: mikepenz/release-changelog-builder-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: release_log
run: |
log=$(./script/changelog.sh)
# multiline
log="${log//'%'/'%25'}"
log="${log//$'\n'/'%0A'}"
log="${log//$'\r'/'%0D'}"
echo "::set-output name=changelog::$log"
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "release/*.zip"
body: |
${{ steps.relase_log.outputs.changelog }}
${{ steps.release_log.outputs.changelog }}
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions script/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

current=$(git describe --tags --abbrev=0)
previous=$(git describe --always --abbrev=0 --tags ${current}^)

git log --oneline --decorate ${previous}...${curent} --pretty="format:- %h %s" | grep -v Merge

0 comments on commit 18b6b95

Please sign in to comment.