[CI] Add draft release step to GitHub Actions workflow#644
Conversation
Removed echo statement for TAG in release workflow.
|
Sorry for pushing things continuously... it's now really ready...! |
| with: | ||
| packages-dir: dist/ | ||
|
|
||
| draft-release: |
There was a problem hiding this comment.
This step should be green even if creating the release fails.
For example, if release was created via the web interface.
There was a problem hiding this comment.
I made the step success optional and then added a checking step
| GH_TOKEN: ${{ github.token }} | ||
| ASSET-FILE-PATH: ./documentation-${{ needs.determine-package.outputs.package }}-${{ needs.determine-package.outputs.version }}.zip | ||
| TAG: ${{ needs.determine-package.outputs.package }}/${{ needs.determine-package.outputs.version }} | ||
| run: gh release upload ${TAG} ${ASSET-FILE-PATH} --clobber # Overwrite existing assets of the same name. |
There was a problem hiding this comment.
Unrelated to these changes: can we use the same (get rid of the svenstaro/upload-release-action) for uploading nightly reduced files here: https://github.com/scipp/ess/blob/main/.github/workflows/nightly.yml#L90
Developers should be able to create a release using github release UI. In that case, the gh release create command will fail.
Clarify comment for release check command.
|
I manually updated the release note btw: https://github.com/scipp/ess/releases/tag/essreduce%2F26.6.2 |
| release_note = [ | ||
| "## What's Changed", | ||
| '', | ||
| f"### {package_name.replace('ess', 'ESS')}", |
There was a problem hiding this comment.
Can you explain why this is now gone?
There was a problem hiding this comment.
It's already included in the release title so it was unnecessarily verbose.
Or we can integrate that into the other section title..? Like:
What's Changed in ESSreduce/26.6.2
Co-authored-by: Neil Vaytet <39047984+nvaytet@users.noreply.github.com>
The release note upload job failed because the release was not drafted/published yet.
It was depending on the assets uploading job to create the release if not present.
It used default values for creating the release if there is None for the given tag.
Then the title was set to a weird commit message instead of the tag name (it depends on how many commits belong to the PR apparently?).
So I added an explicit release draft step with the specific title(tag name).
In this way we can use the runners a bit more efficiently... (release note generating and docs build can take a while.)
Also I removed the upload file action and used
ghcli directly instead.The release note uploading job is responsible for publishing the release,
i.e. the release is set to latest/published from draft when there is a release note.
Assets uploading (built docs) won't be necessarily done by the time the release is published.