-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events for tags matching v*, e.g. v1.0, v20.15.10 | ||
|
||
jobs: | ||
build: | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # git history won't be fetched without this option | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Generate Release Notes | ||
run: npx auto-changelog --template RELEASE.md.hbs --output RELEASE.md --commit-limit false | ||
|
||
- name: Parse Release Notes | ||
id: parse | ||
run: | | ||
NOTES=$(cat RELEASE.md) | ||
NOTES="${NOTES//'%'/'%25'}" | ||
NOTES="${NOTES//$'\n'/'%0A'}" | ||
echo "::set-output name=notes::$NOTES" | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: ${{ steps.parse.outputs.notes }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
coverage | ||
RELEASE.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ coverage | |
.editorconfig | ||
.gitattributes | ||
.github | ||
RELEASE.md.hbs | ||
RELEASE.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{#each releases}} | ||
{{#if @first}} | ||
{{#if summary}} | ||
{{summary}} | ||
{{/if}} | ||
{{#each merges}} | ||
- {{message}}{{#if href}} [`#{{id}}`]({{href}}){{/if}} | ||
{{/each}} | ||
{{#each fixes}} | ||
- {{commit.subject}}{{#each fixes}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}{{/each}} | ||
{{/each}} | ||
{{#each commits}} | ||
- {{subject}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}} | ||
{{/each}} | ||
{{/if}} | ||
{{/each}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters