From 2a9f1f6b1b334f178ea34bb9a41e9d8fb380a0a9 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 13 Jul 2025 08:37:03 +0000 Subject: [PATCH] Update CI files --- .ci/scripts/calc_constraints.py | 3 +++ .github/workflows/publish.yml | 27 +++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.ci/scripts/calc_constraints.py b/.ci/scripts/calc_constraints.py index ffc3b44e..83b623aa 100755 --- a/.ci/scripts/calc_constraints.py +++ b/.ci/scripts/calc_constraints.py @@ -53,6 +53,9 @@ def to_upper_bound(req): if requirement.name == "pulpcore": # An exception to allow for pulpcore deprecation policy. return fetch_pulpcore_upper_bound(requirement) + # skip requirement with environment scopes. E.g 'foo==1.0.0;python_version>=3.9' + if requirement.marker: + return f"# ENVIRONMENT IS UNTRACKABLE: {req}" for spec in requirement.specifier: if spec.operator == "~=": return f"# NO BETTER CONSTRAINT: {req}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 29aebe6e..0f4b9a14 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -149,11 +149,33 @@ jobs: permissions: contents: write + env: + TAG_NAME: "${{ github.ref_name }}" + steps: + - uses: "actions/checkout@v4" + with: + fetch-depth: 0 + path: "pulp_file" + + - uses: "actions/setup-python@v5" + with: + python-version: "3.11" + + - name: "Install towncrier" + run: | + pip install towncrier + + - name: "Get release notes" + id: get_release_notes + run: | + NOTES=$(towncrier build --draft --version $TAG_NAME) + echo "body<> $GITHUB_OUTPUT + echo "$NOTES" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + - name: "Create release on GitHub" uses: "actions/github-script@v7" - env: - TAG_NAME: "${{ github.ref_name }}" with: script: | const { TAG_NAME } = process.env; @@ -162,5 +184,6 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, tag_name: TAG_NAME, + body: `${{ steps.get_release_notes.outputs.body }}`, make_latest: "legacy", });