preact-render-to-string icon indicating copy to clipboard operation
preact-render-to-string copied to clipboard

Introduce github actions workflows

Open sventschui opened this issue 4 years ago • 2 comments

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 avatar May 08 '20 12:05 sventschui

@sventschui I've added {{ secrets.PREACT_NPM_TOKEN }} with the appropriate permissions.

developit avatar May 29 '20 19:05 developit

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.

sventschui avatar Jun 02 '20 15:06 sventschui