Skip to content

Re-add git flow release publish with RDKCM_RDKE token and separate finish step#510

Merged
yogeswaransky merged 2 commits into
feature/component-releasefrom
copilot/featurerestructure-release-workflow
Apr 12, 2026
Merged

Re-add git flow release publish with RDKCM_RDKE token and separate finish step#510
yogeswaransky merged 2 commits into
feature/component-releasefrom
copilot/featurerestructure-release-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 12, 2026

The previous working state collapsed the release finish and push into one step and removed git flow release publish to avoid a ruleset-blocked release/* branch push. This restores the original two-step structure using RDKCM_RDKE (a PAT with ruleset bypass permissions) to allow the publish to succeed.

Changes

  • Checkout: adds token: ${{ secrets.RDKCM_RDKE }} so all downstream git operations inherit the PAT's permissions
  • "Start release, generate changelog and publish" (renamed from "Create release…"): ends with git flow release publish instead of inlining the finish/push logic
  • "Finish release and push" (re-added as separate step): runs git flow release finish then pushes feature/component-release, feature/main-dummy, and tags
- name: Checkout feature/component-release
  uses: actions/checkout@v3
  with:
    ref: feature/component-release
    fetch-depth: 0
    token: ${{ secrets.RDKCM_RDKE }}   # bypasses release/* branch ruleset

# ... start, changelog, commit ...
          git flow release publish

- name: Finish release and push
  run: |
    set -e
    git flow release finish -m "$RELEASE_VERSION release" "$RELEASE_VERSION"
    git push origin feature/component-release
    git push origin feature/main-dummy
    git push origin --tags

RELEASE_VERSION is available in the finish step via $GITHUB_ENV (written in the preceding step), consistent with how the existing cleanup step already consumes it.

Original prompt

Problem

The current component-release.yml workflow on the feature/component-release branch works, but the user wants to re-add git flow release publish and use the RDKCM_RDKE PAT secret (which has permissions to bypass repository rulesets that block release/* branch creation). The workflow should also be restructured back to having a separate "Finish release and push" step.

Current file

The file is at .github/workflows/component-release.yml on branch feature/component-release (BlobSha: c1feab335a32956a8e99a34ecf5eda8368370928).

Required Changes

1. Use RDKCM_RDKE token for checkout

Update the checkout step to use the RDKCM_RDKE secret so that subsequent git push operations use that token's permissions:

      - name: Checkout feature/component-release
        uses: actions/checkout@v3
        with:
          ref: feature/component-release
          fetch-depth: 0
          token: ${{ secrets.RDKCM_RDKE }}

2. Rename and update the main release step

Rename "Create release, generate changelog and push" back to "Start release, generate changelog and publish".

At the end of this step's run: block, replace:

          # Finish release locally (no need to publish to remote)
          git flow release finish -m "$RELEASE_VERSION release" "$RELEASE_VERSION"

          # Push results
          git push origin feature/component-release
          git push origin feature/main-dummy
          git push origin --tags

With just:

          git flow release publish

So the step ends with git flow release publish after the commit (like the original workflow).

3. Re-add the separate "Finish release and push" step

Add back a separate step between the release step and the cleanup step:

      - name: Finish release and push
        run: |
          set -e
          git flow release finish -m "$RELEASE_VERSION release" "$RELEASE_VERSION"
          git push origin feature/component-release
          git push origin feature/main-dummy
          git push origin --tags

4. Keep everything else the same

Keep the gitflow config, git flow init -d -f, version calculation, changelog generation, and the cleanup step all as they currently are.

Expected final structure of the release job steps:

  1. Checkout feature/component-release (with token: ${{ secrets.RDKCM_RDKE }})
  2. Set up Git
  3. Install git-flow and auto-changelog
  4. Start release, generate changelog and publish (ends with git flow release publish)
  5. Finish release and push (separate step)
  6. Cleanup tag if workflow fails

File to modify

  • .github/workflows/component-release.yml (on branch feature/component-release)

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: yes

Assistant: I've kicked off the PR creation process to add git flow init -d -f to the component-release.yml workflow on the feature/component-release branch. We're waiting for your confirmation in the dialog to proceed.

User: @Copilot Accepted Confirmation: Confirm agent session

Assistant: Copilot coding agent is now working on creating the PR. You can track its progress here:

data:
    - title: '[WIP] Fix GitHub Actions workflow by adding git flow init'
      repository: rdkcentral/sysint
      url: https://github.com/copilot/tasks/pull/PR_kwDONYrnSs7Rr1LN?session_id=96115d8d-1c4b-40ef-85aa-0edaa5eccd8a
      state: queued

The fix is straightforward — it will add git flow init -d -f right after the gitflow config block in .github/workflows/component-release.yml on the feature/component-release branch. Once the PR is ready, you can review and merge it, then re-run your release workflow.

User: Using default branch names.

Which branch should be used for bringing forth production releases?

  • feature/component-release
    Branch name for production releases: [feature/component-release]
    Fatal: Production and integration branches should differ.
    Branch name for "next release" development: [feature/component-release]
    Error: Process completed with exit code 1.

this is the error i got with :
@rdkcentral/sysint/files/.github/workflows/component-release.yml

Assistant:

The Problem

git flow init -d uses the default branch names (master and develop), but then your earlier config set both gitflow.branch.master and gitflow.branch.develop to feature/component-release. When git flow init -d -f runs, it detects this and fails because:

Fatal: Production and integration branches should differ.

Git-flow fundamentally requires the production branch and the development branch to be different branches. You cannot use the same branch for both.

The Core Issue

Your workflow design tries to use feature/component-release as both the production and development branch, which is incompatible with git-flow's architecture. Git-flow needs at minimum two distinct bra...

This pull request was created from Copilot chat.

…nish step

Agent-Logs-Url: https://github.com/rdkcentral/sysint/sessions/096e5898-eb23-42e6-9139-fd51ddfc0794

Co-authored-by: yogeswaransky <166126056+yogeswaransky@users.noreply.github.com>
Copilot AI changed the title [WIP] Update component-release.yml to use RDKCM_RDKE and restructure workflow Re-add git flow release publish with RDKCM_RDKE token and separate finish step Apr 12, 2026
Copilot AI requested a review from yogeswaransky April 12, 2026 10:10
@yogeswaransky yogeswaransky marked this pull request as ready for review April 12, 2026 10:12
@yogeswaransky yogeswaransky requested a review from a team as a code owner April 12, 2026 10:12
Copilot AI review requested due to automatic review settings April 12, 2026 10:12
@yogeswaransky yogeswaransky merged commit fdad136 into feature/component-release Apr 12, 2026
2 of 3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants