Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
gh
command to create and add to release
This makes substantial changes to the release workflow, most of them lightly adapted from corresponding material in the ripgrep release workflow. The biggest changes, all adapted directly from ripgrep, are: - The biggest change is to use `gh` (the GitHub CLI) instead of both the ncipollo/release-action and actions/upload-release-asset actions. - Use outputs instead of artifacts for the information that needs to go from the `create-release` job into the `build-release` jobs. This eliminates the need for actions/upload-artifact and actions/download-artifact. Furthermore, since `gh` doesn't require a URL to add files to an existing release, there is only one output, the version. - Split up the "Build archive" step so it doesn't need awkward conditional logic inside a single script step. Now the platform agnostic part of creating the directory and putting documentation in it is one step, followed by steps with `if:` keys for Windows and Unix. For this, the main differences from how it is currently written in the ripgrep workflow are the step titles and the uses of shell expansion rather than `${{ }}` interpolation for the environment variables. Unlike in the corresponding material in ripgrep, this does not compute and upload checksum files. I believe this change is not quite complete, and may not work yet: - I haven't added an explicit `permissions:` in case it might not be needed, but I expect I might need to add it. - When ncipollo/release-action was used, `omitBody: true` was specified. I'm not sure if I need to do anything for that, like passing `--notes ''` to `gh`. But I'm not sure that would really be equivalent, and it might be wrong. For now, I am leaving it out.
- Loading branch information