Skip to content

Conversation

@hariram-ni
Copy link
Collaborator

@hariram-ni hariram-ni commented Sep 25, 2025

Pull Request

🀨 Rationale

Enable the option to create a pre-release version for my current branch changes, so that we can test by dev deploying to SLE instance.

πŸ‘©β€πŸ’» Implementation

workflow_dispatch section enables manual triggering of your GitHub Actions workflow

πŸ§ͺ Testing

Can be tested only after merge

βœ… Checklist

Signed-off-by: Hari Ram Karthik <[email protected]>
@hariram-ni hariram-ni changed the title feast: try out to dev deploy local changes feat: try out to dev deploy local changes Sep 25, 2025
branches:
- main
- alpha
workflow_dispatch:
Copy link
Collaborator Author

@hariram-ni hariram-ni Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch section enables manual triggering of GitHub Actions workflow

branches: [
'main',
'alpha',
{ name: '*', prerelease: 'pre' }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will make sure, any other branch other than main and alpha will create pre release version like 4.11.0-pre.1

Signed-off-by: Hari Ram Karthik <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables manual triggering of pre-release versions from feature branches to support testing deployments to SLE instances before merging to main.

  • Adds workflow_dispatch trigger to allow manual workflow execution with an optional pre-release flag
  • Configures semantic-release to support pre-release versions from any branch
  • Removes the alpha branch from the workflow triggers

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/push.yml Adds manual workflow trigger with pre-release option and conditional logic for release steps
release.config.js Configures semantic-release to support pre-release versions from all branches using wildcard pattern
.github/workflows/pr.yml Removes alpha branch from PR workflow triggers

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition logic may not handle all workflow_dispatch scenarios correctly. When workflow_dispatch is triggered without specifying the prerelease input (or when it's set to 'false'), and the workflow is run from the main branch, none of the release steps will execute because:

  1. Line 40's condition prevents standard releases from non-main branches
  2. Line 46's condition only runs when prerelease is 'true'
  3. Line 52's condition only runs on push events to main

If a user manually triggers the workflow from the main branch with prerelease='false', no release will occur. Consider adding a condition to handle this case:

- name: Manual standard release
  if: github.event_name == 'workflow_dispatch' && github.event.inputs.prerelease == 'false' && github.ref == 'refs/heads/main'
  run: npm run release
  env:
    GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
Suggested change
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
- name: Manual standard release
if: github.event_name == 'workflow_dispatch' && github.event.inputs.prerelease == 'false' && github.ref == 'refs/heads/main'
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}

Copilot uses AI. Check for mistakes.
module.exports = {
branches: [
'main',
{ name: '*', prerelease: 'pre' }
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wildcard branch pattern { name: '*', prerelease: 'pre' } will match all branches, including 'main'. This means semantic-release will attempt to create pre-releases even from the main branch, which conflicts with the intent of having main produce standard releases.

Consider using a more specific pattern that excludes main:

branches: [
    'main',
    { name: '+([0-9])?(.{+([0-9]),x}).x', prerelease: 'pre' },
    { name: 'feature/*', prerelease: 'pre' },
    { name: 'fix/*', prerelease: 'pre' }
]

Or use a negative pattern to exclude main:

branches: [
    'main',
    { name: '!(main)', prerelease: 'pre' }
]
Suggested change
{ name: '*', prerelease: 'pre' }
{ name: '!(main)', prerelease: 'pre' }

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants