Skip to content

Commit

Permalink
Merge branch 'release-5.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Mar 19, 2021
2 parents 393b6b3 + fd36b65 commit 3d26ff5
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 7 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow will do a release after merge to develop branch

name: Relese Tao extension

on:
push:
branches:
- develop
jobs:
auto-release:
name: Automated Tao extension release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

# Install PHP, composer v2 and set environment variables
- name: Setup PHP,
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
tools: composer:v2
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Prepare composer.json file
- name: Prepare composer file
run: |
php -r '$composerArray = json_decode(file_get_contents("./composer.json"), true);
$composerArray["require"][$composerArray["name"]] = "dev-develop";
$composerArray["repositories"] = is_array($composerArray["repositories"]) ? $composerArray["repositories"] : [];
$composerArray["repositories"][] = [
"type" => "vcs",
"url" => "https://github.com/".$composerArray["name"].".git"
];
unset($composerArray["name"]);
file_put_contents("./composer-release.json", json_encode($composerArray, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));'
# Composer Install
- name: Install dependencies
run: |
REPO_NAME=$(jq --raw-output '."name"' composer.json)
EXT_ID=$(jq --raw-output '.extra."tao-extension-name"' composer.json)
COMPOSER=composer-release.json composer install --no-dev --no-interaction --prefer-source
cd $EXT_ID
git config user.name github-actions
git config user.email [email protected]
git remote set-url --push origin https://github.com/$REPO_NAME.git
# Prepare to release
- name: Prepare to release
run: |
mkdir -p taoQtiItem/views/js/mathjax/
touch taoQtiItem/views/js/mathjax/MathJax.js
mkdir -p tao/views/locales/en-US/
echo '{"serial":"9","date":1615820392,"version":"3.3.0-9","translations":{}}' > tao/views/locales/en-US/messages.json
touch index.php
mkdir -p config/
# Install node
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

# Do release
- name: Release Tao Extension
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm i -g @oat-sa/tao-extension-release
EXT_ID=$(jq --raw-output '.extra."tao-extension-name"' composer.json)
taoRelease extensionRelease --extension-to-release ${EXT_ID} --no-interactive --no-write
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
views/node_modules
.idea
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"repositories": [{
"type": "composer",
"url": "http://packages.taocloud.org/"
}],
"repositories": [],
"homepage": "http://www.taotesting.com",
"license": "GPL-2.0",
"keywords": [
Expand All @@ -26,6 +23,7 @@
}
},
"require": {
"oat-sa/oatbox-extension-installer": "~1.1||dev-master"
"oat-sa/oatbox-extension-installer": "~1.1||dev-master",
"oat-sa/tao-core" : ">=47.0.0"
}
}
3 changes: 2 additions & 1 deletion views/js/loader/taoFooBar.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion views/js/loader/taoFooBar.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d26ff5

Please sign in to comment.