Skip to content

Commit

Permalink
feat: added semantic-release for automatic releases
Browse files Browse the repository at this point in the history
  • Loading branch information
paales committed Jun 19, 2020
1 parent f73becb commit f06d0d0
Show file tree
Hide file tree
Showing 5 changed files with 5,583 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn --frozen-lockfile
- run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_BACKEND }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea
/node_modules/
yarn-error.log
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ We now have an acurate stock index with all the source reservations included.
There are other parts that dont use the indexed amount and we need to append the
source reservation to the stock reservation:
[GetSourceReservationsQuantityInterface](https://github.com/ho-nl/magento2-ReachDigital_InventorySourceReservations/blob/master/ISReservationsApi/Model/GetSourceReservationsQuantityInterface.php)

## Commits

Commits are validated with https://github.com/conventional-changelog/commitlint

Gittower: Gittower doesn't properly read your PATH variable and thus commit
validation doesn't work. Use `gittower .` to open this repo.

90 changes: 90 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"name": "@reach-digital/magento2-inventory-source-reservations",
"repository": "git@github.com:ho-nl/magento2-ReachDigital_InventorySourceReservations.git",
"author": "Paul Hachmang <paul@reachdigital.nl>",
"private": true,
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@semantic-release/git": "^9.0.0",
"husky": "^4.2.5",
"semantic-release": "^17.0.8",
"semantic-release-slack-bot": "^1.6.2"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "docs",
"section": "Documentation"
},
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "build",
"section": "Build"
},
{
"type": "refactor",
"section": "Refactor"
}
]
}
}
],
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github",
[
"semantic-release-slack-bot",
{
"notifyOnSuccess": true,
"notifyOnFail": true,
"markdownReleaseNotes": true,
"onSuccessTemplate": {
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*New release for $repo_url 🎉*\n$release_notes"
}
}
]
}
}
]
],
"branches": [
{
"name": "master"
}
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
}
Loading

0 comments on commit f06d0d0

Please sign in to comment.