You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Streamline release process by not explicitly creating a tag in create_draft_release.yml (#7024)
## Summary of changes
Instead of manually creating a tag in `create_draft_release.yml`, create
the tag when the release is _published_.
## Reason for change
Currently, the workflow creates the tag _before_ creating the release.
I'm pretty sure that was because we thought a release had to be
associated with an _existing_ tag. However, as long as you specify the
release sha (we do, now), then you can pass a sha instead, and when you
publish the release it _automatically_ creates the release.

The advantage of this is that we no longer need to _manually_ start the
gitlab pipeline after doing the release. We can have the publishing of
the tag _automatically_ trigger the rest of the GitLab pipeline.
One annoying thing though is that we can no longer use the "built in"
`GH_TOKEN`, because if workflow files have changed, the release fails
(because you need the `workflows` permissions, and you can't grant it
_from_ a workflow). Luckily we already have a token we use for invoking
workflows, so we can switch to that one instead.
## Implementation details
- Use the external GH_TOKEN
- Remove the explicit git publish
- Pass the SHA into the create-release workflow
- Auto trigger the gitlab run when a tag is pushed
## Test coverage
I tested the create release process several times in a dummy repo to
confirm it works as described above. It's also where I caught the
external GH_TOKEN issue too.
## Other details
I'm about 90% sure the release process was actually _wrong_ before, and
we would always tag the `HEAD` commit, even though we could use the
_artifacts_ from a previous commit 😕 I don't think that's what we ever
actually want to do, so that's also implicitly fixed 😅
I'll update the release process docs if/when this is merged
> [!TIP]
> Fun story, this _apparently_ fixes our release note generation issue
too, because authentication sucks
0 commit comments