Skip to content

Artifact

Artifact #113

Workflow file for this run

name: Artifact
on:
workflow_dispatch:
pull_request:
types: [opened, reopened]
branches: [master]
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Get Info
run: |
echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
id: info
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
npm install
npm run build
mkdir -p onlyoffice
rsync -av --exclude='onlyoffice' . onlyoffice
cd onlyoffice
rm -rf ./.github/
rm -rf ./.git/
rm ./.eslintrc.js
rm ./.gitignore
rm ./.gitmodules
rm ./.stylelintrc.json
rm -rf ./node_modules/
rm -rf ./src/
rm ./package.json
rm ./npm-shrinkwrap.json
rm ./webpack.js
rm -rf ./assets/document-templates/.git
rm -rf ./assets/document-formats/.git
rm ./ruleset.xml
cd $cwd
tar -czvf onlyoffice.tar.gz onlyoffice
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: onlyoffice
path: onlyoffice.tar.gz