Skip to content

Commit

Permalink
feat: add semantic release to automate the release process
Browse files Browse the repository at this point in the history
  • Loading branch information
gearsdigital committed Nov 11, 2021
1 parent 30de8b3 commit addb13e
Show file tree
Hide file tree
Showing 7 changed files with 17,658 additions and 6,050 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: RELEASE
on:
push:
branches:
- main

jobs:
release:
name: Release
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install
run: |
npm install
composer build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.PAT_SEMANTIC_RELEASE }}
run: npx semantic-release
5 changes: 3 additions & 2 deletions .github/workflows/php.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHP Composer
name: TEST

on: [push]

Expand All @@ -11,6 +11,7 @@ jobs:
- uses: actions/checkout@v2
with:
path: 'kirby-reporter'
fetch-depth: 0

- name: Install Starterkit
run: |
Expand All @@ -20,7 +21,7 @@ jobs:
- name: Update Kirby
run: |
rm -rf starterkit/kirby
composer require getkirby/cms:3.6.0-rc.1@dev
composer require getkirby/cms:3.6.0-rc.4@dev
mv kirby starterkit
cd starterkit/kirby
composer install
Expand Down
60 changes: 60 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"tagFormat": "v${version}",
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "docs",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "improvement",
"release": "patch"
}
]
},
"@semantic-release/release-notes-generator",
"@ambimax/semantic-release-composer",
"@semantic-release/github",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@ambimax/semantic-release-composer",
{
"skipOnMissingComposerJson": true
}
],
[
"@semantic-release/git",
{
"assets": [
"blueprints",
"lib",
"src",
"templates",
"vendor",
"composer.json",
"package.json",
"CHANGELOG.md",
"index.php",
"index.js",
"index.css"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
Empty file added CHANGELOG.md
Empty file.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "gearsdigital/reporter-for-kirby",
"version": "4.0.1",
"description": "Gather feedback directly out of the Panel! Enable your editors or clients to submit tasks, bugs and ideas either straight to your issue tracker or by E-Mail.",
"type": "kirby-plugin",
"license": "MIT",
Expand Down Expand Up @@ -29,7 +30,8 @@
"mockery/mockery": "^1.4"
},
"scripts": {
"test": "phpunit --bootstrap tests/bootstrap.php tests"
"test": "phpunit --bootstrap tests/bootstrap.php tests",
"build": "composer install --no-dev --no-scripts --optimize-autoloader"
},
"extra": {
"kirby-cms-path": "vendor/getkirby/kirby"
Expand Down
Loading

0 comments on commit addb13e

Please sign in to comment.