mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
Merge pull request #354 from ONLYOFFICE/feature/artifact-actions
ci: artifact and release actions
This commit is contained in:
33
.github/workflows/artifact-csharp-mvc.yml
vendored
Normal file
33
.github/workflows/artifact-csharp-mvc.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
33
.github/workflows/artifact-csharp.yml
vendored
Normal file
33
.github/workflows/artifact-csharp.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
33
.github/workflows/artifact-java.yml
vendored
Normal file
33
.github/workflows/artifact-java.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
33
.github/workflows/artifact-node.yml
vendored
Normal file
33
.github/workflows/artifact-node.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Artifact Nodejs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [master, main]
|
||||||
|
paths: ['web/documentserver-example/nodejs/**']
|
||||||
|
pull_request:
|
||||||
|
branches: [master, main, develop]
|
||||||
|
paths: ['web/documentserver-example/nodejs/**']
|
||||||
|
|
||||||
|
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/nodejs
|
||||||
|
mkdir -p ./deploy/'Node.js Example'
|
||||||
|
rsync -av --exclude='deploy' ./ ./deploy/'Node.js Example'
|
||||||
|
cd ./deploy/'Node.js Example'/public/assets
|
||||||
|
rm -rf ./.git/
|
||||||
|
rm .git
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Node.js.Example
|
||||||
|
path: ${{ github.workspace }}/web/documentserver-example/nodejs/deploy
|
||||||
33
.github/workflows/artifact-php.yml
vendored
Normal file
33
.github/workflows/artifact-php.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
33
.github/workflows/artifact-python.yml
vendored
Normal file
33
.github/workflows/artifact-python.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
34
.github/workflows/artifact-ruby.yml
vendored
Normal file
34
.github/workflows/artifact-ruby.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
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
|
||||||
|
rm .gitignore
|
||||||
|
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
|
||||||
34
.github/workflows/artifact-spring.yml
vendored
Normal file
34
.github/workflows/artifact-spring.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
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
|
||||||
|
rm .gitignore
|
||||||
|
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
|
||||||
148
.github/workflows/release.yml
vendored
Normal file
148
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master,main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Zip
|
||||||
|
run: sudo apt-get install zip
|
||||||
|
- name: Get Info
|
||||||
|
run: |
|
||||||
|
echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
|
||||||
|
id: info
|
||||||
|
- 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 }}
|
||||||
|
cwd=$(pwd)
|
||||||
|
git submodule update --init --recursive
|
||||||
|
cd ./web/documentserver-example/nodejs
|
||||||
|
mkdir -p ./'Node.js Example'
|
||||||
|
rsync -av --exclude='Node.js Example' ./ ./'Node.js Example'
|
||||||
|
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
|
||||||
|
rm .gitignore
|
||||||
|
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
|
||||||
|
rm .gitignore
|
||||||
|
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 }}
|
||||||
Reference in New Issue
Block a user