Skip to content

Update changelog

Update changelog #333

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Update changelog
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 3'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ['1.0', '1.1', '1.2', '1.3', '2.0']
name: Update dependencies "v${{matrix.version}}"
steps:
- name: Checkout specific branch
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
ref: 'release/${{matrix.version}}'
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Read Lerna
id: lerna
run: |
content=`cat ./lerna.json | tr -d "\n"`
echo "::set-output name=lernaJson::$content"
- name: Generate changelogs
run: |
npm i auto-changelog --no-save
npx auto-changelog --release-summary --starting-version "${{matrix.version}}.0" --tag-pattern "^${{matrix.version}}.\d" -o docs/changelog/index.md
npx auto-changelog --release-summary
- name: Commit changed files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add CHANGELOG.md docs/changelog/index.md
git status
git commit -m "chore: update changelogs for v${{matrix.version}}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'release/${{matrix.version}}'