fix[ci]: update create-release action with gh cli#278
fix[ci]: update create-release action with gh cli#278kaizakin wants to merge 1 commit intoshipwright-io:mainfrom
Conversation
Signed-off-by: karthik balasubramanian <karthikbalasubramanian08@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
I have tested it as well |
|
/ok-to-test |
| --notes-file Changes.md \ | ||
| --draft \ | ||
| --prerelease No newline at end of file |
There was a problem hiding this comment.
| --notes-file Changes.md \ | |
| --draft \ | |
| --prerelease | |
| --notes-file Changes.md \ | |
| --draft \ | |
| --prerelease | |
Please add newline at end of file.
| body_path: Changes.md | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
nit: I’d suggest renaming this for consistency.
| exit 1 | ||
| fi | ||
|
|
||
| gh release create "${{ inputs.release }}" \ |
There was a problem hiding this comment.
I think this command is missing the --target flag. For reference, see the command in the build repo: https://github.com/shipwright-io/build/blob/e0c4b9d4ce96a71f31e1d9389a2e885d6cf2e761/.github/workflows/release.yaml#L66
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| if [ ! -f Changes.md ]; then |
There was a problem hiding this comment.
It looks like this may not be needed. According to the GitHub Actions docs, steps are executed in order and are dependent on each other.
Additionally, continue-on-error is set to false by default, which means a failed step will stop the job.
Therefore, it’s safe to assume that if we reach this step, the previous steps have succeeded and the Changes.md file already exists.
Changes
Fixes #166
This PR removes the use of depreceated action
actions/create-releaseand addsgh clito create releasesreason for choosing gh cli over another action:
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes