Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Oct 16, 2024
2 parents a167508 + 812c9c9 commit e59d401
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Changelog and Release

on:
workflow_call:
inputs:
email:
description: "Git user email for commits (optional)"
required: false
type: string
secrets:
token:
required: true

jobs:
changelog-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
preset: "conventionalcommits"
github-token: ${{ secrets.token }}
git-user-email: ${{ inputs.email || '[email protected]' }}

- name: Create Release
uses: softprops/action-gh-release@v2
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
20 changes: 15 additions & 5 deletions RockMigrations.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,21 @@ public function init()
}

protected function hookModuleInstall(HookEvent $event): void
{
$module = wire()->modules->get($event->arguments(0));
if (!$this->pageClassFiles($module)) return;
$this->migrateModule($module);
}
{
$moduleName = $event->arguments(0);
if (!$moduleName) {
throw new WireException('Module name is missing.');
}

$module = wire()->modules->get($moduleName);
if (!$module) {
throw new WireException('Module not found: ' . $moduleName);
}

if (!$this->pageClassFiles($module)) {
return;
}
}

public function ready()
{
Expand Down

0 comments on commit e59d401

Please sign in to comment.