Skip to content

Commit

Permalink
CI: fix release-page body text, new simple changelog gen (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
boozook authored Dec 4, 2020
1 parent 4832224 commit 0e94a6e
Showing 1 changed file with 35 additions and 22 deletions.
57 changes: 35 additions & 22 deletions .github/workflows/release-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,43 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with: { fetch-depth: 0 }
- name: add things for changelog generator
run: npm init -y && sed -i 's/1\.0\.0/${{ steps.version.outputs.value }}/' ./package.json

- id: changelog
name: Generate Changelog
uses: ScottBrenner/[email protected]
continue-on-error: true
env:
REPO: ${{ github.repository }}
run: |
TAG_FIRST=$(git describe --abbrev=0 --tags $(git describe --abbrev=0)^)
TAG_SECOND=$(git describe --abbrev=0)
echo "Generating changelog between tags: $TAG_FIRST...$TAG_SECOND"
RESULT_FILE=generated-changelog.md
RESULT_LOG="$(git log $TAG_FIRST...$TAG_SECOND --pretty=format:'- %s [⃗](${{ github.event.repository.html_url }}/commit/%H)' --reverse)"
echo "
## TODO: EDIT ME BEFORE PUBLISH
[link-tools]: ${{ github.event.repository.html_url }}/actions?query=workflow%3A%22Build+Release+Tools%22
[link-ext]: ${{ github.event.repository.html_url }}/actions?query=workflow%3A%22Build+Release+Ext%22
[badge-tools]: ${{ github.event.repository.html_url }}/workflows/Build%20Release%20Tools/badge.svg?event=workflow_run (tools workflow)
[badge-ext]: ${{ github.event.repository.html_url }}/workflows/Build%20Release%20Ext/badge.svg?event=workflow_run (ext workflow)
__Please wait build completions for:__
- [![Build Release Tools][badge-tools]][link-tools]
- [![Build Release Ext][badge-ext]][link-ext]
- - -
__Changelog ${TAG_FIRST}__…${TAG_SECOND}
$RESULT_LOG
<!-- Built with ♥️. -->
" > $RESULT_FILE
echo ::set-output name=tag_from::"$TAG_FIRST"
echo ::set-output name=tag_to::"$TAG_SECOND"
echo ::set-output name=file::"$RESULT_FILE"
echo ::set-output name=text::$RESULT_LOG
- id: release
name: Create release ${{ steps.version.outputs.value }}
Expand All @@ -40,23 +69,7 @@ jobs:
prerelease: true
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
__TODO: EDIT ME BEFORE PUBLISH__
[link-tools]: ${{ github.event.repository.html_url }}/actions?query=workflow%3A%22Build+Release+Tools%22
[link-ext]: ${{ github.event.repository.html_url }}/actions?query=workflow%3A%22Build+Release+Ext%22
[badge-tools]: ${{ github.event.repository.html_url }}/workflows/Build%20Release%20Tools/badge.svg?event=workflow_run (tools workflow)
[badge-ext]: ${{ github.event.repository.html_url }}/workflows/Build%20Release%20Ext/badge.svg?event=workflow_run "ext workflow"
__Please wait build completions for:__
- [![Build Release Tools][badge-tools]][link-tools]
- [![Build Release Ext][badge-ext]][link-ext]
- - -
### Changelog
${{ steps.changelog.outputs.changelog }}
body_path: ${{ steps.changelog.outputs.file }}

- name: Save release assets url for other workflows
run: echo "${{ steps.version.outputs.value }} ${{ steps.release.outputs.upload_url }}" > release-upload.url
Expand Down

0 comments on commit 0e94a6e

Please sign in to comment.