mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-02-10 18:05:16 +08:00
Fix changelogs (#830)
* Fix windows changelogs * Fix macos change logs * Update action
This commit is contained in:
39
.github/workflows/init-changelogs.yaml
vendored
Normal file
39
.github/workflows/init-changelogs.yaml
vendored
Normal file
@ -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 }}
|
||||
38
.github/workflows/init-version.yaml
vendored
38
.github/workflows/init-version.yaml
vendored
@ -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 }}
|
||||
Reference in New Issue
Block a user