mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
feat(go): artifact and release workflows
This commit is contained in:
32
.github/workflows/artifact-go.yml
vendored
Normal file
32
.github/workflows/artifact-go.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Artifact Golang
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master]
|
||||
paths: ['web/documentserver-example/go/**']
|
||||
pull_request:
|
||||
branches: [master]
|
||||
paths: ['web/documentserver-example/go/**']
|
||||
|
||||
jobs:
|
||||
artifact:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Build Artifact
|
||||
run: |
|
||||
cd ${{ github.workspace }}
|
||||
cwd=$(pwd)
|
||||
git submodule update --init --recursive
|
||||
cd ./web/documentserver-example/go
|
||||
mkdir -p ./deploy/'Go Example'
|
||||
rsync -av --exclude='deploy' ./ ./deploy/'Go Example'
|
||||
rm -rf ./deploy/'Go Example'/static/assets/document-formats/.git
|
||||
rm -rf ./deploy/'Go Example'/static/assets/document-templates/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Go.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/go/deploy
|
||||
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@ -87,6 +87,14 @@ jobs:
|
||||
rsync -av --exclude='Java Spring Example' ./ ./'Java Spring Example'
|
||||
rm -rf ./'Java Spring Example'/src/main/resources/assets/document-formats/.git
|
||||
rm -rf ./'Java Spring Example'/src/main/resources/assets/document-templates/.git
|
||||
- name: Build Go Artifact
|
||||
run: |
|
||||
cd ${{ github.workspace }}
|
||||
cd ./web/documentserver-example/go
|
||||
mkdir -p .'Go Example'
|
||||
rsync -av --exclude='Go Example' ./ ./'Go Example'
|
||||
rm -rf ./'Go Example'/static/assets/document-formats/.git
|
||||
rm -rf ./'Go Example'/static/assets/document-templates/.git
|
||||
- name: Pack Artifacts
|
||||
run: |
|
||||
cd ${{ github.workspace }}/web/documentserver-example/csharp-mvc
|
||||
@ -105,6 +113,8 @@ jobs:
|
||||
zip -r Ruby.Example.zip ./'Ruby Example'
|
||||
cd ${{ github.workspace }}/web/documentserver-example/java-spring
|
||||
zip -r Java.Spring.Example.zip ./'Java Spring Example'
|
||||
cd ${{ github.workspace }}/web/documentserver-example/go
|
||||
zip -r Go.Example.zip ./'Go Example'
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
id: create_release
|
||||
@ -118,6 +128,7 @@ jobs:
|
||||
${{ 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
|
||||
${{ github.workspace }}/web/documentserver-example/java-spring/Java.Spring.Example.zip,
|
||||
${{ github.workspace }}/web/documentserver-example/go/Go.Example.zip
|
||||
"
|
||||
tag: v${{ steps.info.outputs.version }}
|
||||
Reference in New Issue
Block a user