One possible approach is suggested in https://docs.github.com/en/actions/creating-actions/releasing-and-maintaining-actions:
- Uses JasonEtco/build-and-tag-action to compile the action code into the
dist folder automatically when a release is published to GitHub.
- Once the compilation is complete, a commit is automatically pushed containing the compiled action and the tag that the release was created with is force-updated.
- Other major version tags (e.g. "v1") are also force-updated.
- This release workflow is really built around not checking in the
dist folder (i.e. added to gitignore) so that the action is only built by CI upon release, which is probably better from a security standpoint.
- Since the action creates a commit, it requires the
contents: write permission defined in the workflow.
Another approach might be softprops/action-gh-release.
This looks interesting for drafting releases as well: https://github.com/release-drafter/release-drafter.
Another one to look at (though it's for a composite action example): https://github.com/cloudposse/github-actions-workflows-github-action-composite
One possible approach is suggested in https://docs.github.com/en/actions/creating-actions/releasing-and-maintaining-actions:
distfolder automatically when a release is published to GitHub.distfolder (i.e. added to gitignore) so that the action is only built by CI upon release, which is probably better from a security standpoint.contents: writepermission defined in the workflow.Another approach might be softprops/action-gh-release.
This looks interesting for drafting releases as well: https://github.com/release-drafter/release-drafter.
Another one to look at (though it's for a composite action example): https://github.com/cloudposse/github-actions-workflows-github-action-composite