Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow_run causes semantic-release-action to reference wrong branch #178

Open
benitazhang opened this issue Sep 22, 2023 · 1 comment
Open

Comments

@benitazhang
Copy link

Describe the bug
When using workflow_run in a workflow that uses semantic-release-action, semantic release will reference the wrong branch and git tags.

Workflow
I have 1 release branch (main) and 1 pre-release branch (development). I have workflow_run configured to wait for a test workflow to finish before triggering semantic-release

on:
  workflow_run:
    workflows:
      - Tests
    branches:
      - main
      - development
    types:
      - completed
  1. main is on version v1.0.0
  2. development is on version v1.0.1-development.1
  3. commit message fix: typo to main and push to remote
  4. observe how semantic-release incorrectly outputs Found git tag v1.0.1-development.1 associated with version v1.0.1-development.1 on branch development and There are no relevant changes, so no new version is released.

Expected behavior
I would expect to see semantic-release output Found git tag v1.0.1 associated with version 1.0.1 on branch main and then to bump the version number to v1.0.1 on main

Additional context
After removing workflow_run , semantic-release behaves as expected

@rotivleal
Copy link

+1. Seems like

env:
  GITHUB_REF: xx

does not help either.

semantic-release/semantic-release#2704 (comment)

There should be a way to relay environment variables to the command itself

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

No branches or pull requests

2 participants