Skip to content

Commit

Permalink
feat: setup conventional commits
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Mar 4, 2023
1 parent 12244b3 commit 7de3cfb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Releases
on:
push:
branches:
- main

jobs:
changelog:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3.7.1
with:
github-token: ${{ secrets.github_token }}

- name: create release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
5 changes: 4 additions & 1 deletion Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ class Application extends ConsoleApplication
*/
private $root;

public function __construct($name = "RockShell", $version = "1.0.3")
public function __construct($name = "RockShell", $version = null)
{
if (!$version) {
$version = json_decode(file_get_contents(__DIR__ . "/package.json"))->version;
}
$container = new Container;
$events = new Dispatcher($container);
parent::__construct($container, $events, $version);
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "1.0.3"
}

0 comments on commit 7de3cfb

Please sign in to comment.