'Rename assets in Release from GitHub Actions

I have a pre-release on my repository with assets that have a naming scheme like: my-assets-rc.jar

Once I change the release state from pre-release to release, I would like to remove the rc suffix from the assets, hence renaming assets.

I know you can do this manually when editing the release, but is it possible to do this easily automatically with GitHub Actions ?

The only way I can think to achieve this is downloading these assets, rename them in shell, delete previous assets, re-upload them. But this seems very tricky.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source