Skip to content

feat: add sdk repo as submodule #5

feat: add sdk repo as submodule

feat: add sdk repo as submodule #5

Workflow file for this run

name: Release
on:
push:
branches: [master]
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=$(awk '/##/{gsub(/[^0-9]+.[^0-9]+.[^0-9]/, "", $NF); print $NF}' CHANGELOG.md | awk 'NR==1{print $1}')" >> $GITHUB_OUTPUT
id: info
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
mkdir -p ./onlyoffice
rsync -av --exclude='onlyoffice' ./ ./onlyoffice
cd ./onlyoffice
rm -rf .github/
rm -rf .git/
rm .gitignore
rm .gitmodules
cd ./assets
rm .git
cd $cwd
awk '/## [0-9]/{p++} p; /## [0-9]/{if (p > 1) exit}' CHANGELOG.md | awk 'NR>2 {print last} {last=$0}' > RELEASE.md
- name: Pack Artifact
run: zip -r onlyoffice onlyoffice
- name: Create Release
uses: ncipollo/release-action@v1
id: create_release
with:
artifacts: "onlyoffice.zip"
bodyFile: RELEASE.md
tag: v${{ steps.info.outputs.version }}