-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from troublecatstudios/add-continuous-integration
👷 Add continuous integration
- Loading branch information
Showing
5 changed files
with
140 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,3 @@ | ||
[`{{commit.short}}`](https://github.com/{{owner}}/{{repo}}/commit/{{commit.short}}) {{subject}} {{#if issues}}(Issues:{{#each issues}} [`{{text}}`]({{link}}){{/each}}){{/if}}{{#if wip}}{{#each wip}} | ||
- [`{{commit.short}}`](https://github.com/{{owner}}/{{repo}}/commit/{{commit.short}}) {{subject}}{{/each}} | ||
{{/if}} |
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,58 @@ | ||
{{#if compareUrl}} | ||
# [v{{nextRelease.version}}]({{compareUrl}}) ({{datetime "UTC:yyyy-mm-dd"}}) | ||
{{else}} | ||
# v{{nextRelease.version}} ({{datetime "UTC:yyyy-mm-dd"}}) | ||
{{/if}} | ||
|
||
### Installation url | ||
``` | ||
{{#if @root.repository}} | ||
{{~#if @root.host~}} | ||
{{@root.host}}/ | ||
{{~/if~}} | ||
{{~#if @root.owner~}} | ||
{{@root.owner}}/ | ||
{{~/if~}} | ||
{{@root.repository}} | ||
{{~else~}} | ||
{{@root.repoUrl}} | ||
{{~/if~}} | ||
#{{currentTag}} | ||
``` | ||
|
||
{{#with commits}} | ||
{{#if sparkles}} | ||
## ✨ New Features | ||
{{#each sparkles}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if bug}} | ||
## 🐛 Bug Fixes | ||
{{#each bug}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if ambulance}} | ||
## 🚑 Critical Hotfixes | ||
{{#each ambulance}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if lock}} | ||
## 🔒 Security Issues | ||
{{#each lock}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if boom}} | ||
## 💥 Breaking Changes | ||
{{#each boom}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
{{/with}} |
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,26 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
|
||
- name: Release | ||
uses: cycjimmy/semantic-release-action@v2 | ||
with: | ||
extra_plugins: | | ||
semantic-release-gitmoji | ||
@semantic-release/changelog | ||
@semantic-release/git | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,9 @@ | ||
{ | ||
"name": "com.troublecat.chonks", | ||
"version": "0.0.1", | ||
"displayName": "Chonks.net", | ||
"description": "Savegame system for C# (Unity3D, Monogame) projects", | ||
"dependencies": { | ||
"semantic-release-gitmoji": "*" | ||
} | ||
} |
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,44 @@ | ||
const { promisify } = require('util') | ||
const dateFormat = require('dateformat') | ||
const readFileAsync = promisify(require('fs').readFile) | ||
const path = require('path'); | ||
|
||
const TEMPLATE_DIR = path.resolve(__dirname, './.github/templates'); | ||
|
||
// the *.hbs template and partials should be passed as strings of contents | ||
const template = readFileAsync(path.join(TEMPLATE_DIR, 'default.hbs')) | ||
const commitTemplate = readFileAsync(path.join(TEMPLATE_DIR, 'commit.hbs')) | ||
|
||
module.exports = { | ||
plugins: [ | ||
[ | ||
'semantic-release-gitmoji', { | ||
releaseRules: { | ||
major: [ ':boom:', '💥' ], | ||
minor: [ ':sparkles:', '✨' ], | ||
patch: [ | ||
':bug:', '🐛', | ||
':ambulance:', '🚑', | ||
':lock:', '🔒' | ||
] | ||
}, | ||
releaseNotes: { | ||
template, | ||
partials: { commitTemplate }, | ||
helpers: { | ||
datetime: function (format = 'UTC:yyyy-mm-dd') { | ||
return dateFormat(new Date(), format) | ||
} | ||
}, | ||
issueResolution: { | ||
template: '{baseUrl}/{owner}/{repo}/issues/{ref}', | ||
baseUrl: 'https://github.com', | ||
source: 'github.com' | ||
} | ||
} | ||
} | ||
], | ||
'@semantic-release/git', | ||
'@semantic-release/changelog' | ||
] | ||
} |