From 159f7b675831750ecf983feddbb6c070e15751bf Mon Sep 17 00:00:00 2001 From: Chris Burr Date: Tue, 15 Sep 2026 13:42:08 +0200 Subject: [PATCH 1/3] chore: update the conda-forge feedstock as part of the release process --- .github/workflows/deployment.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 8b420fdfa98..297e74ea284 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -21,6 +21,8 @@ jobs: id-token: write attestations: write contents: write + outputs: + conda-forge-version: ${{ steps.check-tag.outputs.conda-forge-version }} defaults: run: shell: bash -l {0} @@ -111,6 +113,9 @@ jobs: # Output to later steps echo "create-release=true" >> $GITHUB_OUTPUT echo "new-version=$NEW_VERSION" >> $GITHUB_OUTPUT + # Expose the version for the conda-forge feedstock, skipping pre-releases + CONDA_FORGE_VERSION=$(python -c $'from packaging.version import Version; v = Version('"'$NEW_VERSION'"$')\nprint("" if v.is_prerelease else v)') + echo "conda-forge-version=$CONDA_FORGE_VERSION" >> $GITHUB_OUTPUT fi fi fi @@ -189,3 +194,19 @@ jobs: uses: mxschmitt/action-tmate@v3 with: limit-access-to-actor: true + + update-conda-forge: + name: conda-forge feedstock update + runs-on: "ubuntu-latest" + needs: deploy-pypi + if: needs.deploy-pypi.outputs.conda-forge-version != '' + steps: + - name: Update the dirac-grid feedstock + uses: conda-forge/release@v2026.9.15 + with: + feedstock: dirac-grid-feedstock + feedstock-branch: v9.0.x + version: ${{ needs.deploy-pypi.outputs.conda-forge-version }} + github-token: ${{ secrets.CONDA_FORGE_PAT }} + github-token-for-fork: ${{ secrets.CONDA_FORGE_FORK_PAT }} + automerge: true From 9e180abbeb9955766e3bdcac61750f4a1817edb4 Mon Sep 17 00:00:00 2001 From: Chris Burr Date: Tue, 15 Sep 2026 13:52:03 +0200 Subject: [PATCH 2/3] fix: look up the release notes reference tag directly instead of listing tags --- .../scripts/dirac-docs-get-release-notes.py | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/diracdoctools/scripts/dirac-docs-get-release-notes.py b/docs/diracdoctools/scripts/dirac-docs-get-release-notes.py index bfe360b8050..5141a60e48d 100755 --- a/docs/diracdoctools/scripts/dirac-docs-get-release-notes.py +++ b/docs/diracdoctools/scripts/dirac-docs-get-release-notes.py @@ -504,26 +504,35 @@ def getGithubLatestTagDate(self, sinceTag): """ log = LOGGER.getChild("getGithubLatestTagDate") - # Get all tags - tags = req2Json(url=self._github("tags"), queryParameters={"per_page": 100}) - if isinstance(tags, dict) and "Not Found" in tags.get("message"): - raise RuntimeError(f"Package not found: {str(self)}") - if sinceTag: - for tag in tags: - if tag["name"] == sinceTag: - latestTag = tag + # Look the tag up directly as there are more tags than fit in a single page of + # the "tags" endpoint. This matches any tag starting with sinceTag so the exact + # match still has to be picked out of the results. + refs = req2Json(url=self._github(f"git/matching-refs/tags/{sinceTag}"), queryParameters={"per_page": 100}) + for ref in refs: + if ref["ref"] == f"refs/tags/{sinceTag}": break else: raise ValueError(f"Tag {sinceTag} not found") + latestTagName = sinceTag + latestTagCommitSha = ref["object"]["sha"] + if ref["object"]["type"] == "tag": + # Annotated tags have to be dereferenced to find the commit they point at + tagInfo = req2Json(url=self._github(f"git/tags/{latestTagCommitSha}")) + latestTagCommitSha = tagInfo["object"]["sha"] else: + # Get all tags + tags = req2Json(url=self._github("tags"), queryParameters={"per_page": 100}) + if isinstance(tags, dict) and "Not Found" in tags.get("message"): + raise RuntimeError(f"Package not found: {str(self)}") + sortedTags = sorted(tags, key=lambda tag: LooseVersion(tag["name"]), reverse=True) - latestTag = sortedTags[0] + latestTagName = sortedTags[0]["name"] + latestTagCommitSha = sortedTags[0]["commit"]["sha"] - log.info("Found latest tag %s", latestTag["name"]) + log.info("Found latest tag %s", latestTagName) # Use the sha of the commit to finally retrieve the date - latestTagCommitSha = latestTag["commit"]["sha"] commitInfo = req2Json(url=self._github(f"git/commits/{latestTagCommitSha}")) startDate = dateutil.parser.isoparse(commitInfo["committer"]["date"]) From 7c73b6d48ec067d770a30f207329712f724e219c Mon Sep 17 00:00:00 2001 From: Chris Burr Date: Tue, 15 Sep 2026 14:20:05 +0200 Subject: [PATCH 3/3] chore: run the feedstock update in the conda-forge environment and pin the action --- .github/workflows/deployment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 297e74ea284..d8687e0e48e 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -200,9 +200,10 @@ jobs: runs-on: "ubuntu-latest" needs: deploy-pypi if: needs.deploy-pypi.outputs.conda-forge-version != '' + environment: conda-forge steps: - name: Update the dirac-grid feedstock - uses: conda-forge/release@v2026.9.15 + uses: conda-forge/release@45b05fddc6addd06d5f982ebe0a88378ec44de92 # v2026.9.15 with: feedstock: dirac-grid-feedstock feedstock-branch: v9.0.x