Skip to content

Merge pull request #8 from ONLYOFFICE/develop #2

Merge pull request #8 from ONLYOFFICE/develop

Merge pull request #8 from ONLYOFFICE/develop #2

Workflow file for this run

name: Release
on:
push:
branches: [master]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- 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 Artifact
run: |
cd ${{ github.workspace }}
mkdir -p ./onlyoffice-docspace-drupal
rsync -av --exclude='onlyoffice-docspace-drupal' ./ ./onlyoffice-docspace-drupal
cd ./onlyoffice-docspace-drupal
rm -rf ./.github/
rm -rf ./.git/
rm ./.gitignore
cd $cwd
- name: Pack Artifact
run: zip -r onlyoffice-docspace-drupal-${{ steps.info.outputs.version }}.zip onlyoffice-docspace-drupal
- name: Create Release
uses: ncipollo/release-action@v1
id: create_release
with:
artifacts: "onlyoffice-docspace-drupal-${{ steps.info.outputs.version }}.zip"
bodyFile: RELEASE.md
tag: v${{ steps.info.outputs.version }}