Skip to content

Split master CHANGELOG.md to each minor version #2

Split master CHANGELOG.md to each minor version

Split master CHANGELOG.md to each minor version #2

name: Split master CHANGELOG.md to each minor version
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
split_changelog:
runs-on: ubuntu-latest
steps:
- name: "Setup NodeJS"
uses: actions/setup-node@v4
with:
node-version: 18
- name: "Checkout fluentui-charting-contrib"
uses: actions/checkout@v4
with:
path: "repo"
- name: Check git config
run: |
cd ./repo
git remote -v
- name: "Create Splits of CHANGELOG and move to docs"
run: |
node ./repo/apps/docsite/src/scripts/splitChangelog.ts
cd ./repo/docs
rm -rf ./changelogSplits
mkdir ./changelogSplits
mv -f ./../../dist/* ./changelogSplits
- name: Get current timestamp
id: timestamp
run: |
echo "::set-output name=timestamp::$(date +%Y%m%d%H%M%S)"
echo "::set-output name=displayTimestamp::$(date +%Y-%m-%d\ %H:%M:%S)"
- name: Commit changes to repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: repo
branch: changelog-${{ steps.timestamp.outputs.timestamp }}
create_branch: true
commit_message: Changelog update on ${{ steps.timestamp.outputs.displayTimestamp }}