You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/post-release-version-bump.yml
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ on:
6
6
version:
7
7
description: 'Version number (e.g., 1.0.1)'
8
8
required: true
9
+
is_patch:
10
+
description: 'Is this a patch? (true or false)'
11
+
required: true
12
+
default: 'false'
9
13
10
14
env:
11
15
AWS_DEFAULT_REGION: us-east-1
@@ -109,6 +113,16 @@ jobs:
109
113
VERSION="${{ github.event.inputs.version }}"
110
114
npm install
111
115
sed -i "s|\(/aws-observability/adot-autoinstrumentation-node:\)v[0-9]\+\.[0-9]\+\.[0-9]\+|\1v${{github.event.inputs.version}}|g" .github/workflows/daily-scan.yml
116
+
117
+
# for patch releases, avoid merge conflict by manually resolving CHANGELOG with main
118
+
if [[ "${{ github.event.inputs.is_patch }}" == "true" ]]; then
119
+
git fetch origin main
120
+
git show origin/main:CHANGELOG.md | sed -n '/## Unreleased/,/^## v[0-9]/p' | sed '$d' | tail -n +2 | sed '/^$/d' > /tmp/unreleased_content.txt
121
+
122
+
# Insert the content right after the existing "## Unreleased" header
123
+
sed -i '/## Unreleased/r /tmp/unreleased_content.txt' CHANGELOG.md
124
+
fi
125
+
112
126
git add .
113
127
git status
114
128
git commit -m "Prepare main for next development cycle: Update version to $DEV_VERSION"
0 commit comments