nextstrain / augur

Pipeline components for real-time phylodynamic analysis
https://docs.nextstrain.org/projects/augur/
GNU Affero General Public License v3.0
268 stars 128 forks source link

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

Closed corneliusroemer closed 1 week ago

corneliusroemer commented 1 week ago

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: https://github.com/nextstrain/augur/pull/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: https://github.com/nextstrain/augur/blob/00b97741efe2518c4f21d7cc9dc0fb1b7af3ed89/.github/workflows/ci.yaml#L360 https://github.com/nextstrain/augur/pull/1634/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133ddR360

tsibley commented 1 week ago

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

victorlin commented 1 week ago

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

victorlin commented 1 week ago

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 commented 1 week ago

Another release error:

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

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

victorlin commented 1 week ago

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?