From b1e1db1fc4d767e6f92d937d3f4abd7dc81589d6 Mon Sep 17 00:00:00 2001 From: Anton Oreskin Date: Tue, 22 Sep 2026 17:17:22 +0200 Subject: [PATCH] Allow same-version binding regeneration --- .../update_bindings_and_push_to_vulkan.yml | 23 +++++++++++++++---- README.md | 5 ++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_bindings_and_push_to_vulkan.yml b/.github/workflows/update_bindings_and_push_to_vulkan.yml index 8001345..f4ccb80 100644 --- a/.github/workflows/update_bindings_and_push_to_vulkan.yml +++ b/.github/workflows/update_bindings_and_push_to_vulkan.yml @@ -9,6 +9,11 @@ on: description: "Optional Vulkan-Docs tag (for example v1.4.362)" required: false type: string + force_regenerate: + description: "Regenerate the already-published registry tag after a generator fix" + required: false + default: false + type: boolean permissions: contents: read @@ -26,11 +31,13 @@ jobs: outputs: requested: ${{ steps.versions.outputs.requested }} changed: ${{ steps.versions.outputs.changed }} + branch: ${{ steps.versions.outputs.branch }} steps: - uses: actions/checkout@v7 - id: versions env: REQUESTED_VERSION: ${{ inputs.vk_docs_version }} + FORCE_REGENERATE: ${{ inputs.force_regenerate }} TARGET_VERSION_URL: https://raw.githubusercontent.com/antono2/vulkan/master/VERSION run: | set -euo pipefail @@ -49,10 +56,18 @@ jobs: exit 1 } changed=true - [[ "$current" == "$requested" ]] && changed=false + branch="generated/$requested" + if [[ "$current" == "$requested" ]]; then + changed=false + if [[ "$FORCE_REGENERATE" == true ]]; then + changed=true + branch="compat/generated-$requested" + fi + fi echo "requested=$requested" >> "$GITHUB_OUTPUT" echo "changed=$changed" >> "$GITHUB_OUTPUT" - echo "Current: $current; requested: $requested; update required: $changed" + echo "branch=$branch" >> "$GITHUB_OUTPUT" + echo "Current: $current; requested: $requested; update required: $changed; branch: $branch" generate: needs: versions @@ -130,7 +145,7 @@ jobs: path: generated - name: Commit generated module to a release branch env: - BRANCH_NAME: generated/${{ needs.versions.outputs.requested }} + BRANCH_NAME: ${{ needs.versions.outputs.branch }} run: | set -euo pipefail test -f c/volk.c.v @@ -157,7 +172,7 @@ jobs: fi - name: Open or update pull request env: - BRANCH_NAME: generated/${{ needs.versions.outputs.requested }} + BRANCH_NAME: ${{ needs.versions.outputs.branch }} GH_TOKEN: ${{ secrets.PUSH_VULKAN }} RELEASE_VERSION: ${{ needs.versions.outputs.requested }} run: | diff --git a/README.md b/README.md index b74311b..e3b17eb 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,11 @@ validates them with V, and opens a generated pull request in creates the matching immutable version tag after the target repository's required checks pass. +When the registry tag is already published but the generator itself needs a +compatibility correction, run the workflow manually with `force_regenerate`. +It opens a `compat/generated-` pull request without changing `VERSION` or +using the release-only `generated/*` branch namespace. + `publish-compatibility-tags.yml` is a manual maintenance workflow for old registry releases whose original generated layout is not accepted by current V. It publishes new `+vcompat.N` tags and never rewrites the historical tags.