preact-render-to-string
preact-render-to-string copied to clipboard
Introduce github actions workflows
This introduces two workflows. Open for feedback and improvements.
push.yml
A regular CI build that runs tests.
Todo
- [ ] Test coverage
release-publish.yml
Triggers when a release is published on github. It runs npm version <tag-name>
and attaches the npm package tarball to the release. It then pushes the commit created by npm version and force pushes the release tag to the same commit.
- It currently can not run
npm publish
preact packages require 2FA for publishing - It will fail and not update the branch/commit when there were commits added to the referenced branch in the meantime (kinda "expected behaviour")
- It will fail if the release was not created on a branch but rather a commit (SHA)
@sventschui I've added {{ secrets.PREACT_NPM_TOKEN }}
with the appropriate permissions.
Awesome 🥳 Only thing left then is how to handle the protected branches as pointed out by @marvinhagemeister. I guess it would be best to adjust the workflow to create a PR and then do the release on PR merge.
I‘ll try to dig into this during the following days.