-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.1 KB
/
changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Update Changelog
on:
# Runs whenever a new tag is pushed
push:
tags:
- '*.*.*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Update Changelog job
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Update Changelogs
run: |
changelogs=("$(find "connectors" -type f -name "CHANGELOG.md")")
version=$GITHUB_REF_NAME
date=$(date +"%Y-%m-%d")
for changelog in ${changelogs[*]}
do
echo "$changelog"
# Replace the line containing "## Unreleased" with new version and date
sed -i -e "s/^## Unreleased$/## [$v] - $date/" "$changelog"
done
- name: Commit Changelogs
run: |
git config user.name THEObuildbot
git config user.email [email protected]
git add connectors/**/CHANGELOG.md
git commit -m "update CHANGELOG.md"
git push