Skip to content

Develop

Develop #32

Workflow file for this run

name: Artifact
on:
workflow_dispatch:
pull_request:
types: [opened, reopened]
branches: [master]
jobs:
platforms:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.platform-matrix.outputs.matrix }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Get Liferay Platforms
id: platform-matrix
run: |
content=$(cat ./release.json)
content=$(echo $content | jq -c .)
echo "matrix={\"include\":$content}" >> $GITHUB_OUTPUT
build:
needs: platforms
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.platforms.outputs.matrix)}}
steps:
- name: Checkout Repository
if: ${{ !matrix.branch }}
uses: actions/checkout@v3
- name: Checkout Specific
if: ${{ matrix.branch }}
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- name: Get Package Info
run: |
echo "package=$(sed -n -e 's/^Bundle-SymbolicName: //p' bnd.bnd)" >> $GITHUB_OUTPUT
echo "version=$(sed -n -e 's/^Bundle-Version: //p' bnd.bnd)" >> $GITHUB_OUTPUT
id: info
- name: Install Java 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- name: Build with Liferay Blade CLI
shell: bash
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
java -version
git submodule update --init --recursive
curl -L https://raw.githubusercontent.com/liferay/liferay-blade-cli/master/cli/installers/local | sh
echo 'export PATH="$PATH:$HOME/jpm/bin"' >> ~/.bash_profile
source ~/.bash_profile
blade version
blade init -v ${{ matrix.platform }} workspace
cd workspace/modules
modules=$(pwd)
mkdir onlyoffice-liferay
cd $cwd
rsync -av --exclude='workspace' ./ ./workspace/modules/onlyoffice-liferay
cd $modules
blade gw jar
cd ./onlyoffice-liferay/build/libs
mv ${{ steps.info.outputs.package }}-${{ steps.info.outputs.version }}.jar $cwd/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.info.outputs.package }}-${{ steps.info.outputs.version }}-${{ matrix.name }}
path: ${{ steps.info.outputs.package }}-${{ steps.info.outputs.version }}.jar