Skip to content

feat(ci): trigger gh-gcs release automatically from cd.yaml #96

Description

@shouze

Context

Part of the gh-gcs epic (#93).

Once the fulll/gh-gcs release workflow exists (#96), cd.yaml must dispatch a repository_dispatch event to fulll/gh-gcs at the end of a successful release so that the extension is always kept in sync without any manual step.

Goal

Add a final step to the release job in .github/workflows/cd.yaml:

- name: Trigger gh-gcs release
  env:
    GH_TOKEN: ${{ secrets.GH_GCS_DISPATCH_TOKEN }}
  run: |
    gh api repos/fulll/gh-gcs/dispatches \
      --method POST \
      --field event_type=new-release \
      --field 'client_payload[version]=${{ github.ref_name }}'

Required secret

GH_GCS_DISPATCH_TOKEN: a GitHub PAT (or fine-grained token) scoped to fulll/gh-gcs with contents: write permission. Must be added to the fulll/github-code-search repository secrets.

The step must run after the release assets are fully uploaded and the GitHub Release is created.

Acceptance criteria

  • Pushing a vX.Y.Z tag to github-code-search automatically triggers the gh-gcs release workflow
  • The gh-gcs release is created with the matching version tag within ~5 min of the github-code-search release
  • A missing or invalid GH_GCS_DISPATCH_TOKEN fails visibly in the workflow log (non-silent failure)
  • Manual workflow_dispatch on gh-gcs still works as a fallback

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions