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
Add create-empty-github-release entrypoint; fix latest-release flag
The new create-empty-github-release entrypoint lets a release workflow
create the GitHub release at the version tag early, so release artefacts
can be attached to it as they are built across per-platform jobs. The
release is created with an empty body and is explicitly not marked as
the latest release; a later publish-release-notes-to-github call fills
in the body. If a release for the tag already exists, the entrypoint is
a no-op so that restart paths do not clobber partial progress.
publish-release-notes-to-github now sets make_latest=true when creating
or updating the release. Without this, GitHub's "releases/latest" URL
did not correspond to the most recent release for repos using this
action — an oversight that becomes load-bearing as consumers (starting
with ponyup) begin pulling binaries from GitHub Releases. The script
also gains GithubException handling around update_release and
create_git_release so API failures exit with a clear message instead
of a traceback.
PyGithub is bumped to 2.9.0 because make_latest was added in 2.1.0.
The bump also deprecates the positional Github(token) constructor, so
both existing PyGithub-using scripts are updated to the Auth.Token form
to avoid DeprecationWarning noise in release logs. Because PyGithub's
create_git_release defaults make_latest to "true" (not NotSet), the
new entrypoint must pass make_latest="false" explicitly to keep the
empty release from being marked latest.
Design: ponylang/ponyup#406
Copy file name to clipboardExpand all lines: README.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,12 +152,16 @@ jobs:
152
152
153
153
### Release
154
154
155
-
The meat of the release process. This is the workflow that builds our actual release artefacts, updates documentation and whatever else. Release-bot only provides two commands to be used in this workflow.
155
+
The meat of the release process. This is the workflow that builds our actual release artefacts, updates documentation and whatever else. Release-bot provides three commands to be used in this workflow.
156
156
157
157
- pre-artefact-changelog-check
158
158
159
159
Can be used to verify that the release workflow wasn't "accidentally" triggered.
160
160
161
+
- create-empty-github-release
162
+
163
+
Creates an empty GitHub release for the version tag so that release artefacts can be attached to it as they are built. Not required unless you need a GitHub release for artefact attachment.
164
+
161
165
- trigger-release-announcement
162
166
163
167
Is used to start the `announce-a-release` workflow and is meant to be run after all artefact building has completed.
@@ -356,6 +360,30 @@ An example step config:
356
360
GIT_USER_EMAIL: "ponylang.main@gmail.com"
357
361
```
358
362
363
+
### create-empty-github-release
364
+
365
+
Creates an empty GitHub release for the tag being released. The release is created with an empty body, not marked as a draft, and not marked as the latest release. The release body and the "latest" flag can be set later by `publish-release-notes-to-github`.
366
+
367
+
This command exists so that release artefacts can be attached to the GitHub release as they are built during the `release` workflow. It should be run as part of the `pre-artefact-creation` job, after `pre-artefact-changelog-check`.
368
+
369
+
If a release for the tag already exists, `create-empty-github-release` does nothing. This means the command is safe to re-run if the `release` workflow has to be restarted.
370
+
371
+
- **Must** be triggered by an `X.Y.Z` tag push.
372
+
- **Should** be run after `pre-artefact-changelog-check` and before any artefact building steps.
373
+
374
+
`create-empty-github-release`requires a GitHub personal access token with `public_repo` access. The personal access token needs to be passed in the environment variable `RELEASE_TOKEN`.
0 commit comments