nodejs actions only

This commit is contained in:
Sergey Linnik
2023-03-14 17:37:56 +05:00
parent a916941fcf
commit 01bee97593
13 changed files with 0 additions and 491 deletions

View File

@ -1,33 +0,0 @@
name: Artifact Csharp MVC
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/csharp-mvc/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/csharp-mvc/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/csharp-mvc
mkdir -p ./deploy/'DotNet (Csharp MVN) Example'
rsync -av --exclude='deploy' ./ ./deploy/'DotNet (Csharp MVC) Example'
cd ./deploy/'DotNet (Csharp MVC) Example'/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: DotNet.Csharp.MVC.Example
path: ${{ github.workspace }}/web/documentserver-example/csharp-mvc/deploy

View File

@ -1,33 +0,0 @@
name: Artifact Csharp
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/csharp/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/csharp/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/csharp
mkdir -p ./deploy/'DotNet (Csharp) Example'
rsync -av --exclude='deploy' ./ ./deploy/'DotNet (Csharp) Example'
cd ./deploy/'DotNet (Csharp) Example'/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: DotNet.Csharp.Example
path: ${{ github.workspace }}/web/documentserver-example/csharp/deploy

View File

@ -1,33 +0,0 @@
name: Artifact Java
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/java/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/java/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/java
mkdir -p ./deploy/'Java Example'
rsync -av --exclude='deploy' ./ ./deploy/'Java Example'
cd ./deploy/'Java Example'/src/main/resources/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Java.Example
path: ${{ github.workspace }}/web/documentserver-example/java/deploy

View File

@ -1,33 +0,0 @@
name: Artifact PHP
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/php/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/php/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/php
mkdir -p ./deploy/'PHP Example'
rsync -av --exclude='deploy' ./ ./deploy/'PHP Example'
cd ./deploy/'PHP Example'/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: PHP.Example
path: ${{ github.workspace }}/web/documentserver-example/php/deploy

View File

@ -1,33 +0,0 @@
name: Artifact Python
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/python/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/python/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/python
mkdir -p ./deploy/'Python Example'
rsync -av --exclude='deploy' ./ ./deploy/'Python Example'
cd ./deploy/'Python Example'/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Python.Example
path: ${{ github.workspace }}/web/documentserver-example/python/deploy

View File

@ -1,33 +0,0 @@
name: Artifact Ruby
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/ruby/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/ruby/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/ruby
mkdir -p ./deploy/'Ruby Example'
rsync -av --exclude='deploy' ./ ./deploy/'Ruby Example'
cd ./deploy/'Ruby Example'/public/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Ruby.Example
path: ${{ github.workspace }}/web/documentserver-example/ruby/deploy

View File

@ -1,33 +0,0 @@
name: Artifact Java Spring
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/java-spring/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/java-spring/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/java-spring
mkdir -p ./deploy/'Java Spring Example'
rsync -av --exclude='deploy' ./ ./deploy/'Java Spring Example'
cd ./deploy/'Java Spring Example'/src/main/resources/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Java.Spring.Example
path: ${{ github.workspace }}/web/documentserver-example/java-spring/deploy

View File

@ -1,31 +0,0 @@
name: Lint Java
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/java/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/java/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/java
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Run linter
run: |
mvn -version
mvn package

View File

@ -1,29 +0,0 @@
name: PHPCs
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/php/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/php/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/php
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: cs2pr, phpcs
- name: Run phpcs
run: phpcs -q --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml --ignore=node_modules,bower_components,vendor ./

View File

@ -1,40 +0,0 @@
name: PyLint
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/python/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/python/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/python
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install pylint
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint Flake8
run: |
flake8 ./**/*.py --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 ./**/*.py --count --max-complexity=10 --max-line-length=79 --statistics
- name: Lint Pylint
run: |
pylint ./**/*.py

View File

@ -1,31 +0,0 @@
name: Rubocop
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/ruby/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/ruby/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/ruby
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Install dependencies
run: |
bundle install
- name: Rubocop
run: |
gem install rubocop
rubocop

View File

@ -1,31 +0,0 @@
name: Lint Spring
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/java-spring/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/java-spring/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/java-spring
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Run linter
run: |
mvn -version
mvn package

View File

@ -22,39 +22,6 @@ jobs:
- name: Generate Changelog
run: |
awk '/## [0-9]/{p++} p; /## [0-9]/{if (p > 1) exit}' CHANGELOG.md | awk 'NR>2 {print last} {last=$0}' > RELEASE.md
- name: Build Csharp MVC Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/csharp-mvc
mkdir -p ./'DotNet (Csharp MVC) Example'
rsync -av --exclude='DotNet (Csharp MVC) Example' ./ ./'DotNet (Csharp MVC) Example'
cd ./'DotNet (Csharp MVC) Example'/assets
rm -rf ./.git/
rm .git
- name: Build Csharp Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/csharp
mkdir -p ./'DotNet (Csharp) Example'
rsync -av --exclude='DotNet (Csharp) Example' ./ ./'DotNet (Csharp) Example'
cd ./'DotNet (Csharp) Example'/assets
rm -rf ./.git/
rm .git
- name: Build Java Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/java
mkdir -p ./'Java Example'
rsync -av --exclude='Java Example' ./ ./'Java Example'
cd ./'Java Example'/src/main/resources/assets
rm -rf ./.git/
rm .git
- name: Build Nodejs Artifact
run: |
cd ${{ github.workspace }}
@ -66,81 +33,16 @@ jobs:
cd ./'Node.js Example'/public/assets
rm -rf ./.git/
rm .git
- name: Build PHP Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/php
mkdir -p ./'PHP Example'
rsync -av --exclude='PHP Example' ./ ./'PHP Example'
cd ./'PHP Example'/assets
rm -rf ./.git/
rm .git
- name: Build Python Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/python
mkdir -p ./'Python Example'
rsync -av --exclude='Python Example' ./ ./'Python Example'
cd ./'Python Example'/assets
rm -rf ./.git/
rm .git
- name: Build Ruby Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/ruby
mkdir -p ./'Ruby Example'
rsync -av --exclude='Ruby Example' ./ ./'Ruby Example'
cd ./'Ruby Example'/public/assets
rm -rf ./.git/
rm .git
- name: Build Spring Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/java-spring
mkdir -p ./'Java Spring Example'
rsync -av --exclude='Java Spring Example' ./ ./'Java Spring Example'
cd ./'Java Spring Example'/src/main/resources/assets
rm -rf ./.git/
rm .git
- name: Pack Artifacts
run: |
cd ${{ github.workspace }}/web/documentserver-example/csharp-mvc
zip -r DotNet.Csharp.MVC.Example.zip ./'DotNet (Csharp MVC) Example'
cd ${{ github.workspace }}/web/documentserver-example/csharp
zip -r DotNet.Csharp.Example.zip ./'DotNet (Csharp) Example'
cd ${{ github.workspace }}/web/documentserver-example/java
zip -r Java.Example.zip ./'Java Example'
cd ${{ github.workspace }}/web/documentserver-example/nodejs
zip -r Node.js.Example.zip ./'Node.js Example'
cd ${{ github.workspace }}/web/documentserver-example/php
zip -r PHP.Example.zip ./'PHP Example'
cd ${{ github.workspace }}/web/documentserver-example/python
zip -r Python.Example.zip ./'Python Example'
cd ${{ github.workspace }}/web/documentserver-example/ruby
zip -r Ruby.Example.zip ./'Ruby Example'
cd ${{ github.workspace }}/web/documentserver-example/java-spring
zip -r Java.Spring.Example.zip ./'Java Spring Example'
- name: Create Release
uses: ncipollo/release-action@v1
id: create_release
with:
bodyFile: RELEASE.md
artifacts: "
${{ github.workspace }}/web/documentserver-example/csharp-mvc/DotNet.Csharp.MVC.Example.zip,
${{ github.workspace }}/web/documentserver-example/csharp/DotNet.Csharp.Example.zip,
${{ github.workspace }}/web/documentserver-example/java/Java.Example.zip,
${{ github.workspace }}/web/documentserver-example/nodejs/Node.js.Example.zip,
${{ github.workspace }}/web/documentserver-example/php/PHP.Example.zip,
${{ github.workspace }}/web/documentserver-example/python/Python.Example.zip,
${{ github.workspace }}/web/documentserver-example/ruby/Ruby.Example.zip,
${{ github.workspace }}/web/documentserver-example/java-spring/Java.Spring.Example.zip
"
tag: v${{ steps.info.outputs.version }}