Skip to content

Commit

Permalink
Merge pull request #189 from DLTcollab/release-it
Browse files Browse the repository at this point in the history
CI: add new version release workflow
  • Loading branch information
jserv committed Sep 5, 2019
2 parents 74bfacf + 0afc242 commit 6cd8ea7
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .auto-changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"template": "changelog.hbs",
"issuePattern": "fix.*:"
}
26 changes: 26 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"hooks": {
"before:github:release": [
"make BUILD_REMOTE=1 BUILD_DEBUG=1 BOARD=de10nano BUILD_FPGA_ACCEL=1",
"tar zcvf remote-worker.tar.gz --directory=build remote-worker"
]
},
"git": {
"changelog": "npx auto-changelog --stdout",
"requireUpstream": false,
"commit": false,
"tag": true,
"tagName": "v${version}",
"push": false
},
"github": {
"release": true,
"releaseName": "v${version}",
"preRelease": true,
"draft": true,
"tokenRef": "GITHUB_TOKEN",
"assets": [
"remote-worker.tar.gz"
]
}
}
19 changes: 19 additions & 0 deletions changelog.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{#with releases.[0]}}

## {{title}} {{#if niceDate}}({{niceDate}}){{/if}}

### :tada: New Features

{{#commit-list merges heading="" message='feat.*: '}}
- {{{message}}} ({{commit.shorthash}})
{{/commit-list}}

{{#commit-list commits heading="" message='feat.*: '}}
- {{{subject}}} ({{shorthash}})
{{/commit-list}}

{{#commit-list fixes heading='### :bug: Bug Fixes'}}
- {{commit.subject}} ({{commit.shorthash}})
{{/commit-list}}

{{/with}}
20 changes: 20 additions & 0 deletions docs/release-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Release Workflow

The motivation of release workfow is to update the GitHub release page
when there is a new tag pushed to the GitHub.

The release workflow uses `auto-changelog` utility to generate the
changelog, then use `release-it` utility to publish the changelog
on the release page.

The `release-it` will also build the `remote-worker`, and upload the
packed the `remote-worker` to release page.

- `.release-it`: `release-it` configuration file
- `.auto-changelog`: `auto-changelog` configuration file
- `changelog.hbs`: changelog template file

## Reference

- [release-it/release-it](https://github.com/release-it/release-it)
- [CookPete/auto-changelog](https://github.com/CookPete/auto-changelog)

0 comments on commit 6cd8ea7

Please sign in to comment.