Skip to content

Commit c28d3c4

Browse files
committed
update wordPressPlugin workflow
1 parent 8a65eab commit c28d3c4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/deployWordPressPlugin.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: Push WordPress Plugin to SVN
22
on:
3-
push:
4-
tags:
5-
- "*"
3+
release:
4+
types: [published]
65
workflow_dispatch:
76
permissions:
87
id-token: write

dev/buildWordPressPlugin.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
require $baseDir . '/vendor/autoload.php';
55

66
$helper = new WpBuildHelper($baseDir);
7+
$version = \bdk\Debug::VERSION;
78

89
// move src/* to vendor/bdk
910
$files = \glob($baseDir . '/src/*');
@@ -31,8 +32,8 @@
3132

3233
// move main plugin files to root
3334
$files = [
34-
$baseDir . '/src/debug-console-php.php',
35-
$baseDir . '/src/readme.txt',
35+
$baseDir . '/vendor/bdk/Debug/FrameWork/WordPress/debug-console-php.php',
36+
$baseDir . '/vendor/bdk/Debug/FrameWork/WordPress/readme.txt',
3637
];
3738
foreach ($files as $filepath) {
3839
$filepathNew = $baseDir . '/' . \basename($filepath);
@@ -50,7 +51,7 @@
5051
// update debug-console-php.php
5152
$filepath = $baseDir . '/debug-console-php.php';
5253
$helper->edit($filepath, [
53-
['/^(\s*\* Version: ).*$/m', '${1}' . \bdk\Debug::VERSION],
54+
['/^(\s*\* Version: ).*$/m', '${1}' . $version],
5455
// ['/^(\$pathBase = ).*$/m', '$1__DIR__;'],
5556
// ['#\'/src/Debug/Autoloader.php\'#', '\'/vendor/bdk/Debug/Autoloader.php\''],
5657
// ['/^(\$autoloader->addPsr4\(.*?, )__DIR__(\);)/m', '$1\$pathBase . \'/src\'$2'],

0 commit comments

Comments
 (0)