Add prePublish and postPublish hooks
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 641
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 30
Description
### Pre-flight checklist
- [x] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
### Problem description
Electron Forge doesn't have publish hooks e.g. prePublish and postPublish. I want these hooks so I can do a version check: I want to ensure in CI that the published version has been updated so that auto-updates work properly for users -- if the published app overwrites the previous version, the app won't auto-update.
### Proposed solution
Introduce prePublish and postPublish hooks.
### Alternatives considered
I can build around it in CI by just running the version verification command before I publish, but it'd be nice to define all the needed configuration in forge.config.ts, especially because the verification needs assets generated during the `generateAssets` hook.
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.