-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix composer.json CS * Update release builder * Update release builder for UI * Add missing "version" to composer for develop * Prepare for release
- Loading branch information
Showing
5 changed files
with
174 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Build Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**\.build/*' | ||
- 'release/*' | ||
- '!**\.gen' | ||
|
||
jobs: | ||
autocommit: | ||
name: Build Release | ||
runs-on: ubuntu-latest | ||
container: | ||
image: atk4/image:latest-npm | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Target variables - discover | ||
id: target | ||
run: | | ||
echo "::set-output name=version_name::$(echo '${{ github.ref }}' | sed -E 's~.+/~~')" | ||
- name: Target variables - show | ||
run: | | ||
echo "Target Version: ${{ steps.target.outputs.version_name }}" | ||
if ! echo "${{ steps.target.outputs.version_name }}" | grep '^[0-9]\+\.[0-9]\+\.[0-9]\+'; then echo "ERROR: Version must have [0-9].[0-9].[0-9] format!"; exit 1 ; fi | ||
- name: Install PHP dependencies | ||
run: composer update --ansi --prefer-dist --no-interaction --no-progress --optimize-autoloader | ||
|
||
- name: Composer unset version | ||
run: composer config version --unset | ||
|
||
- name: Update composer.json | ||
run: >- | ||
php -r ' | ||
$f = __DIR__ . "/composer.json"; | ||
$data = json_decode(file_get_contents($f), true); | ||
foreach ($data as $k => $v) { | ||
if (preg_match("~^(.+)-release$~", $k, $matches)) { | ||
$data[$matches[1]] = $data[$k]; unset($data[$k]); | ||
} | ||
} | ||
$str = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; | ||
echo $str; | ||
file_put_contents($f, $str); | ||
' | ||
- name: Composer validate config | ||
run: composer validate --strict --no-check-lock && composer normalize --dry-run --no-check-lock | ||
|
||
- name: Update version in src/App.php | ||
run: | | ||
sed -i "s|public \$version.*|public \$version = '${{ steps.target.outputs.version_name }}';|" src/App.php | ||
- name: Install JS dependencies | ||
run: | | ||
npm install --loglevel=error -g pug-cli less less-plugin-clean-css uglify-js | ||
(cd js && npm ci --loglevel=error) | ||
- name: Compile JS and CSS files for CDN | ||
run: | | ||
(cd js && npm run build) | ||
sed -i "s~'https://raw.githack.com/atk4/ui/develop/public.*~'/public',~" src/App.php | ||
lessc public/agileui.less public/agileui.css --clean-css="--s1 --advanced" --source-map | ||
echo '!/agileui.css.map' >> public/.gitignore | ||
- name: Commit | ||
run: | | ||
git config --global user.name "$(git show -s --format='%an')" | ||
git config --global user.email "$(git show -s --format='%ae')" | ||
git add -A && git diff --staged && git commit -m "Build Release \"${{ steps.target.outputs.version_name }}\"" | ||
- name: Push | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: ${{ github.ref }}.gen | ||
force: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,95 @@ | ||
{ | ||
"name": "atk4/ui", | ||
"type": "library", | ||
"description": "Agile UI - Web Component Framework written in PHP", | ||
"keywords": [ | ||
"framework", | ||
"ui", | ||
"web", | ||
"form", | ||
"component", | ||
"widget", | ||
"render", | ||
"gadget", | ||
"button", | ||
"grid", | ||
"crud" | ||
], | ||
"homepage": "https://github.com/atk4/ui", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Romans Malinovskis", | ||
"email": "[email protected]", | ||
"homepage": "https://nearly.guru/" | ||
"name": "atk4/ui", | ||
"type": "library", | ||
"description": "Agile UI - Web Component Framework written in PHP", | ||
"keywords": [ | ||
"framework", | ||
"ui", | ||
"web", | ||
"form", | ||
"component", | ||
"widget", | ||
"render", | ||
"gadget", | ||
"button", | ||
"grid", | ||
"crud" | ||
], | ||
"homepage": "https://github.com/atk4/ui", | ||
"version": "dev-develop", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Romans Malinovskis", | ||
"email": "[email protected]", | ||
"homepage": "https://nearly.guru/" | ||
}, | ||
{ | ||
"name": "Alain Belair", | ||
"homepage": "https://agiletoolkit.org/" | ||
}, | ||
{ | ||
"name": "Imants Horsts", | ||
"homepage": "https://darkside.lv/" | ||
}, | ||
{ | ||
"name": "Francesco Danti", | ||
"homepage": "https://oracoltech.com/" | ||
}, | ||
{ | ||
"name": "Michael Voříšek", | ||
"homepage": "https://mvorisek.cz/" | ||
}, | ||
{ | ||
"name": "Philipp Grashoff" | ||
}, | ||
{ | ||
"name": "Alex Cicovic", | ||
"homepage": "https://alexcicovic.com/" | ||
}, | ||
{ | ||
"name": "Georgi Hristov", | ||
"homepage": "https://xsystems.io/" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.3.0", | ||
"atk4/data": "dev-develop" | ||
}, | ||
{ | ||
"name": "Alain Belair", | ||
"homepage": "https://agiletoolkit.org/" | ||
"require-release": { | ||
"php": ">=7.3.0", | ||
"atk4/data": "~2.4.0" | ||
}, | ||
{ | ||
"name": "Imants Horsts", | ||
"homepage": "https://darkside.lv/" | ||
"require-dev": { | ||
"behat/behat": "^3.8", | ||
"behat/mink": "^1.8", | ||
"behat/mink-extension": "^2.3.1", | ||
"behat/mink-selenium2-driver": "^1.4", | ||
"ergebnis/composer-normalize": "^2.13", | ||
"friendsofphp/php-cs-fixer": "^2.17", | ||
"fzaninotto/faker": "^1.6", | ||
"guzzlehttp/guzzle": "^6.3", | ||
"instaclick/php-webdriver": "^1.4.7", | ||
"johnkary/phpunit-speedtrap": "^3.2", | ||
"phpstan/phpstan": "^0.12.82", | ||
"phpunit/phpcov": "*", | ||
"phpunit/phpunit": ">=9.3", | ||
"symfony/process": "^4.4 || ^5.0" | ||
}, | ||
{ | ||
"name": "Francesco Danti", | ||
"homepage": "https://oracoltech.com/" | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
{ | ||
"name": "Michael Voříšek", | ||
"homepage": "https://mvorisek.cz/" | ||
"autoload": { | ||
"psr-4": { | ||
"Atk4\\Ui\\": "src/" | ||
} | ||
}, | ||
{ | ||
"name": "Philipp Grashoff" | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Atk4\\Ui\\Tests\\": "tests/", | ||
"Atk4\\Ui\\Behat\\": "tests-behat/bootstrap/" | ||
} | ||
}, | ||
{ | ||
"name": "Alex Cicovic", | ||
"homepage": "https://alexcicovic.com/" | ||
}, | ||
{ | ||
"name": "Georgi Hristov", | ||
"homepage": "https://xsystems.io/" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"require": { | ||
"php": ">=7.3.0", | ||
"atk4/data": "dev-develop" | ||
}, | ||
"require-release": { | ||
"php": ">=7.3.0", | ||
"atk4/data": "~2.3.0" | ||
}, | ||
"require-dev": { | ||
"behat/behat": "^3.8", | ||
"behat/mink": "^1.8", | ||
"behat/mink-extension": "^2.3.1", | ||
"behat/mink-selenium2-driver": "^1.4", | ||
"friendsofphp/php-cs-fixer": "^2.17", | ||
"fzaninotto/faker": "^1.6", | ||
"guzzlehttp/guzzle": "^6.3", | ||
"instaclick/php-webdriver": "^1.4.7", | ||
"johnkary/phpunit-speedtrap": "^3.2", | ||
"phpstan/phpstan": "^0.12.82", | ||
"phpunit/phpcov": "*", | ||
"phpunit/phpunit": ">=9.3", | ||
"symfony/process": "^4.4 || ^5.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Atk4\\Ui\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Atk4\\Ui\\Tests\\": "tests/", | ||
"Atk4\\Ui\\Behat\\": "tests-behat/bootstrap/" | ||
} | ||
} | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |