commit
78f274075a
|
@ -0,0 +1,86 @@
|
|||
name: MonarcAppBO releases
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master' ]
|
||||
tags: [ 'v*.*', 'v*.*.*', 'v*.*.*-*' ]
|
||||
pull_request:
|
||||
branches: [ 'master' ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [ "16.x" ]
|
||||
php-version: [ "7.4" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install deps
|
||||
run: sudo apt-get update && sudo apt install -y gettext
|
||||
|
||||
# PHP
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
tools: composer:v2.3
|
||||
extensions: bcmath
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
run: composer validate
|
||||
|
||||
- name: Install PHP dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
|
||||
- name: Symlink Monarc modules
|
||||
run: |
|
||||
mkdir -p module/Monarc
|
||||
ln -s ../../vendor/monarc/core module/Monarc/Core
|
||||
ln -s ../../vendor/monarc/backoffice module/Monarc/BackOffice
|
||||
|
||||
# javascript
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install
|
||||
|
||||
- name: Install ng-anr dependencies
|
||||
run: |
|
||||
npm install
|
||||
working-directory: node_modules/ng_anr/
|
||||
|
||||
- name: Install ng-backoffice dependencies
|
||||
run: |
|
||||
npm install
|
||||
working-directory: node_modules/ng_backoffice/
|
||||
|
||||
# final "cleanup"
|
||||
- name: post job
|
||||
run: |
|
||||
bash -ex ./scripts/link_modules_resources.sh
|
||||
bash -ex ./scripts/compile_translations.sh
|
||||
|
||||
# prepare release
|
||||
- name: Get repository name
|
||||
id: repository
|
||||
run: echo "::set-output name=pathref::$(echo '${{ github.repository }}' | cut -d'/' -f2)-$(echo '${{ github.ref_name }}' | sed 's/[^[:alnum:]\.-]/_/g')"
|
||||
|
||||
- name: create artifact archive
|
||||
run: |
|
||||
tar --exclude .git --exclude .github -zcf '../${{ steps.repository.outputs.pathref }}.tar.gz' .
|
||||
|
||||
- name: release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
../${{ steps.repository.outputs.pathref }}.tar.gz
|
||||
fail_on_unmatched_files: true
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
|
@ -10,8 +10,8 @@
|
|||
"author": "CASES",
|
||||
"license": "GNU Affero General Public License version 3",
|
||||
"dependencies": {
|
||||
"ng_anr": "git+https://github.com/monarc-project/ng-anr.git#master",
|
||||
"ng_backoffice": "git+https://github.com/monarc-project/ng-backoffice.git#master"
|
||||
"ng_anr": "git+https://github.com/monarc-project/ng-anr.git#v2.11.1-p5",
|
||||
"ng_backoffice": "git+https://github.com/monarc-project/ng-backoffice.git#v2.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~1.5.3",
|
||||
|
|
|
@ -40,7 +40,7 @@ fi
|
|||
# Link modules resources. TODO: Replace with Grunt tasks to minify the JS and CSS.
|
||||
cd public/views/ && find ../../node_modules/ng_backoffice/views -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
|
||||
cd dialogs/ && find ../../../node_modules/ng_backoffice/views/dialogs -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
|
||||
cd ../partials/ && find ../../../node_modules/ng_backoffice/views/partials -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
|
||||
#cd ../partials/ && find ../../../node_modules/ng_backoffice/views/partials -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
|
||||
cd ../../js/ && find ../../node_modules/ng_backoffice/src -maxdepth 1 -name "*" -exec ln -s {} \; 2>/dev/null
|
||||
cd ../css/ && find ../../node_modules/ng_backoffice/css -name "*" -exec ln -s {} \; 2>/dev/null
|
||||
cd ../img/ && find ../../node_modules/ng_backoffice/img -name "*" -exec ln -s {} \; 2>/dev/null
|
||||
|
|
Loading…
Reference in New Issue