update deploy.yml by masteradhoc · Pull Request #773 · WordPress/two-factor
Fixes #655
What?
Updates the GitHub Actions deploy workflow to replace the archived actions/upload-release-asset action with the maintained softprops/action-gh-release action for uploading release assets.
Why?
The actions/upload-release-asset action is archived and no longer maintained. Its own documentation recommends migrating to softprops/action-gh-release. Continuing to rely on an archived action poses maintenance and reliability risks for future releases.
How?
Replaced actions/upload-release-asset@v1 with softprops/action-gh-release@v2.
- Added a small preparation step to rename the generated ZIP file so the uploaded release asset keeps the existing, expected name (.zip).
- Removed deprecated inputs (upload_url, asset_path, asset_name, asset_content_type) that are specific to the old action and not used by action-gh-release.
Testing Instructions
- Create and push a tag (e.g. git tag vX.Y.Z && git push origin vX.Y.Z).
- Verify the GitHub Actions workflow completes successfully.
- Confirm a GitHub Release exists for the tag.
- Confirm the release contains an asset named .zip with the expected contents.
Screenshots or screencast
Changelog Entry
Changed – Replace deprecated GitHub Actions release asset upload step with a maintained alternative.