Skip to content

Commit

Permalink
ci: Fix CHANGELOG diff
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Dec 31, 2019
1 parent 315eb1f commit e30d78d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
- name: Prepare release
run: |
echo "::set-env name=CHANGELOG_SHA::$(git rev-parse HEAD)"
git fetch origin
npm run release -- --release-as "${RELEASE_TYPE}" --preset eslint
git push origin "${BRANCH_NAME}"
Expand Down Expand Up @@ -83,7 +84,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git diff HEAD^ ./CHANGELOG.md | grep "^+" | sed -e '1d' | sed -e 's/^+//g' > ./release_notes.md
git diff "${CHANGELOG_SHA}" HEAD ./CHANGELOG.md | grep "^+" | sed -e '1d' | sed -e 's/^+//g' > ./release_notes.md
sed -i "1iRelease ${TAG_NAME}\n" ./release_notes.md
hub release create \
--draft \
Expand Down

0 comments on commit e30d78d

Please sign in to comment.