Skip to content

Commit

Permalink
ci: add release automation (#1810)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Sep 23, 2021
1 parent e1c27ab commit b7217e5
Show file tree
Hide file tree
Showing 11 changed files with 11,985 additions and 7,001 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ jobs:
run: npm run ci:check
- name: CI Node Engine Check
run: npm run ci:checkNodeEngine
check-changelog:
name: Changelog
timeout-minutes: 5
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: dangoslen/changelog-enforcer@v2
# check-lint:
# name: Lint
# timeout-minutes: 15
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: release
name: Release
on:
release:
types: [published]
push:
branches: [ master, alpha, beta, next-major ]
jobs:
publish-npm:
runs-on: ubuntu-18.04
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://registry.npmjs.org/
Expand All @@ -19,6 +19,7 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm publish
- run: npx semantic-release
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
61 changes: 61 additions & 0 deletions .releaserc/commit.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
*{{#if scope}} **{{scope}}:**
{{~/if}} {{#if subject}}
{{~subject}}
{{~else}}
{{~header}}
{{~/if}}

{{~!-- commit link --}} {{#if @root.linkReferences~}}
([{{shortHash}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.commit}}/{{hash}}))
{{~else}}
{{~shortHash}}
{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~/if}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.issue}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

11 changes: 11 additions & 0 deletions .releaserc/footer.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{#if noteGroups}}
{{#each noteGroups}}

### {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} ([{{commit.shortHash}}]({{commit.shortHash}}))
{{/each}}
{{/each}}

{{/if}}
25 changes: 25 additions & 0 deletions .releaserc/header.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{#if isPatch~}}
##
{{~else~}}
#
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.repository~}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if~}}
/compare/{{previousTag}}...{{currentTag}})
{{~else}}
{{~version}}
{{~/if}}
{{~#if title}} "{{title}}"
{{~/if}}
{{~#if date}} ({{date}})
{{/if}}
14 changes: 14 additions & 0 deletions .releaserc/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{> header}}

{{#each commitGroups}}

{{#if title}}
### {{title}}

{{/if}}
{{#each commits}}
{{> commit root=@root}}
{{/each}}
{{/each}}

{{> footer}}
404 changes: 35 additions & 369 deletions CHANGELOG.md

Large diffs are not rendered by default.

375 changes: 375 additions & 0 deletions changelogs/CHANGELOG_master.md

Large diffs are not rendered by default.

Loading

0 comments on commit b7217e5

Please sign in to comment.