diff --git a/.github/workflows/init-changelogs.yaml b/.github/workflows/init-changelogs.yaml new file mode 100644 index 000000000..0a0650927 --- /dev/null +++ b/.github/workflows/init-changelogs.yaml @@ -0,0 +1,39 @@ +name: Initialize changelog files + +on: workflow_dispatch + +jobs: + changelogs: + if: >- + ${{ contains(github.ref, 'refs/heads/hotfix/v') || + contains(github.ref, 'refs/heads/release/v') }} + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.PUSH_TOKEN }} + + - name: Set version + run: | + REF="${{ github.ref }}" + echo "VERSION=${REF#*/v}" >> $GITHUB_ENV + + - name: Create changelogs + run: | + CHANGES_WIN=win-linux/package/windows/update/changes + CHANGES_MAC=macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes + + rm -rfv $CHANGES_WIN/$VERSION $CHANGES_MAC/$VERSION + cp -fRTv $CHANGES_WIN/0.0.0 $CHANGES_WIN/$VERSION + cp -fRTv $CHANGES_MAC/0.0.0 $CHANGES_MAC/$VERSION + find $CHANGES_WIN/$VERSION $CHANGES_MAC/$VERSION -name "*.html" -print \ + -exec sed -e 's/0.0.0/'${VERSION}'/g' -e 's/000/'${VERSION//./}'/g' -i {} \; + + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + author_name: github-actions[bot] + author_email: github-actions[bot]@users.noreply.github.com + message: Initialize changelogs for v${{ env.VERSION }} diff --git a/.github/workflows/init-version.yaml b/.github/workflows/init-version.yaml deleted file mode 100644 index 79d9c6989..000000000 --- a/.github/workflows/init-version.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Create changelog files - -on: workflow_dispatch - -jobs: - - create-changelog: - if: >- - ${{ contains(github.ref, 'refs/heads/hotfix/v') || - contains(github.ref, 'refs/heads/release/v') }} - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - with: - token: ${{ secrets.PUSH_TOKEN }} - - - name: Set version - run: >- - echo "${{ github.ref_name }}" | - awk '{gsub(/.+\/v/,"version=");print;}' >> $GITHUB_ENV - - - name: Create template changelogs - run: | - mkdir -pv win-linux/package/windows/update/changes/$version - echo "TODO" >> win-linux/package/windows/update/changes/$version/en.html - echo "TODO" >> win-linux/package/windows/update/changes/$version/ru.html - cp -rfv \ - macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/template \ - macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/$version - - - name: Commit changes - uses: EndBug/add-and-commit@v8 - with: - author_name: github-actions[bot] - author_email: github-actions[bot]@users.noreply.github.com - message: Create template changelogs for v${{ env.version }} diff --git a/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/template/ReleaseNotes.html b/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/0.0.0/changes.html similarity index 83% rename from macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/template/ReleaseNotes.html rename to macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/0.0.0/changes.html index 088a876bf..066424784 100644 --- a/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/template/ReleaseNotes.html +++ b/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/0.0.0/changes.html @@ -85,8 +85,10 @@
-

ONLYOFFICE ?.?.? - [Date]

+

ONLYOFFICE 0.0.0 - {{DATE}}

+

New Features

+

All Editors