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

Bug in release workflow: it doesn't actually release anymore #1674

Closed
corneliusroemer opened this issue Nov 12, 2024 · 5 comments · Fixed by #1675 or #1676
Closed

Bug in release workflow: it doesn't actually release anymore #1674

corneliusroemer opened this issue Nov 12, 2024 · 5 comments · Fixed by #1675 or #1676
Assignees
Labels
bug Something isn't working

Comments

@corneliusroemer
Copy link
Member

corneliusroemer commented Nov 12, 2024

I ran release workflow with tag 26.1.0, it ran successfully but it didn't actually release

https://github.com/nextstrain/augur/actions/runs/11799213368

Brave Browser 2024-11-12 16 40 45

Maybe related to recent changes to release workflow: #1634 by @victorlin? Or did I do something wrong during release process? I exactly followed the manual:

  1. Go to this GitHub Actions workflow.
  2. Select Run workflow. In the new menu:
    1. Ensure master branch is selected.
    2. In New version X.X.X, provide the new version number.
    3. Select Run workflow.

It's hard to test this without triggering a release itself:

if: github.event_name == 'workflow_call' && github.workflow_ref == format('{0}/.github/workflows/release.yaml@refs/heads/{1}', github.repository, github.event.repository.default_branch)

https://github.com/nextstrain/augur/pull/1634/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133ddR360

@corneliusroemer corneliusroemer added the bug Something isn't working label Nov 12, 2024
@corneliusroemer corneliusroemer changed the title Bug in release workflow: it doesn't actually release Bug in release workflow: it doesn't actually release anymore Nov 12, 2024
@tsibley
Copy link
Member

tsibley commented Nov 12, 2024

I'd guess that github.event.repository doesn't have a default_branch property.

@victorlin
Copy link
Member

Sorry you had to be the guinea pig here. Should've tested before merging! I'll debug on a personal fork.

@victorlin victorlin self-assigned this Nov 12, 2024
@victorlin
Copy link
Member

victorlin commented Nov 12, 2024

The issue is the condition github.event_name == 'workflow_call'. Even though ci.yaml is called by another workflow, the github context is associated with the caller workflow so the condition should be github.event_name == 'workflow_dispatch'. See this debugging run.

@victorlin
Copy link
Member

Another release error:

HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/

We forgot to add secrets: inherit in the caller workflow 🤦

@victorlin victorlin reopened this Nov 12, 2024
@victorlin
Copy link
Member

This release made it halfway through. My plan:

  1. Revert version bumps in git repo

    # <on latest master>
    git revert c88c5183798992334f4e469883308b7731f4f508
    git push
    git push --delete origin 26.1.0
  2. PR to add secrets: inherit

  3. Re-release 26.1.0 – third time's the charm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants