Skip to content

Commit f1c94fd

Browse files
committed
add all dependency versions to release notes
1 parent ae1ab19 commit f1c94fd

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/release-build.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,30 @@ jobs:
376376
env:
377377
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
378378
run: |
379-
# Extract versions from pyproject.toml
380-
SDK_VERSION=$(grep "opentelemetry-sdk ==" aws-opentelemetry-distro/pyproject.toml | sed 's/.*== \([^,]*\).*/\1/' | tr -d '"')
381-
INSTRUMENTATION_VERSION=$(grep "opentelemetry-instrumentation ==" aws-opentelemetry-distro/pyproject.toml | sed 's/.*== \([^,]*\).*/\1/' | tr -d '"')
379+
# Extract all dependencies from pyproject.toml
380+
DEPS=$(python3 -c "
381+
import re
382+
with open('aws-opentelemetry-distro/pyproject.toml', 'r') as f:
383+
content = f.read()
384+
deps_match = re.search(r'dependencies\s*=\s*\[(.*?)\]', content, re.DOTALL)
385+
if deps_match:
386+
deps_content = deps_match.group(1)
387+
dep_lines = re.findall(r'\"([^\"]+)\"', deps_content)
388+
formatted_deps = []
389+
for dep_line in dep_lines:
390+
if ' == ' in dep_line:
391+
package, version = dep_line.split(' == ', 1)
392+
formatted_deps.append(f'- \`{package}\` - {version}')
393+
else:
394+
formatted_deps.append(f'- \`{dep_line}\`')
395+
print('\n'.join(formatted_deps))
396+
")
382397
383398
# Create release notes
384399
cat > release_notes.md << EOF
385-
This release contains updates of the following upstream components:
400+
This release contains the following upstream components:
386401
387-
OpenTelemetry Python - $SDK_VERSION
388-
OpenTelemetry Python Contrib - $INSTRUMENTATION_VERSION
402+
$DEPS
389403
390404
This release also publishes to public ECR and PyPi.
391405
* See ADOT Python auto-instrumentation Docker image v${{ github.event.inputs.version }} in our public ECR repository:

0 commit comments

Comments
 (0)