Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-deployments #75

Open
jan-molak opened this issue Nov 21, 2024 · 3 comments
Open

Auto-deployments #75

jan-molak opened this issue Nov 21, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@jan-molak
Copy link
Contributor

jan-molak commented Nov 21, 2024

Hey @sand4rt, as discussed in #52 and #49, it would be good to make playwright-ct-web deploy a new version whenever Playwright is updated.

I'm wondering what the best way to automate this process is, so I thought we could discuss it here.

I see that, at the moment, this repository has two GitHub workflows:

  • test, that runs the tests whenever new changes are introduced (e.g. a dependency is updated)
  • deploy that deploys the artifacts via pnpm publish

I assume that the version number in package.json needs to be bumped manually, committed, and then you need to trigger the release via GitHub UI. Is that correct?

I'm not clear on how the release notes get generated at https://github.com/sand4rt/playwright-ct-web/releases
Is this an automated process?

@jan-molak jan-molak added the enhancement New feature or request label Nov 21, 2024
@sand4rt
Copy link
Owner

sand4rt commented Nov 21, 2024

Hey @jan-molak, thanks a lot!

I assume that the version number in package.json needs to be bumped manually, committed trigger the release via GitHub UI. Is that correct

Correct

I'm not clear on how the release notes get generated

I just click the generate button manually in the GitHub UI

@jan-molak
Copy link
Contributor Author

jan-molak commented Nov 21, 2024

The slightly tricky part is that the version number of @sand4rt/experimental-ct-web is kept in sync with the underlying Playwright version number, like 1.49.0. This means that @sand4rt/experimental-ct-web can be released only when there's a Playwright release, which prevents any patch releases on the @sand4rt/experimental-ct-web side.

If this is how you want to keep it, then we could configure a release pipeline that, upon a merge to the default branch:

  • gets the Playwright version from playwright-ct-web/package.json, e.g. 1.49.0
  • checks the latest version of @sand4rt/experimental-ct-web from npmjs.jcom using something like npm show @sand4rt/experimental-ct-web version
  • if the Playwright version is higher than the latest module version published to npmjs.com, the pipeline would set the version field of playwright-ct-web/package.json to match the Playwright version, commit the code and perform a release (using gh release create CLI)
  • if the Playwright version is the same as the latest module version, there's no release

An alternative could be to depart slightly from keeping the version number in sync with Playwright and introduce a build number component, like 1.49.0-build.1 and then perform a release on every merge to the default branch.

@sand4rt
Copy link
Owner

sand4rt commented Nov 22, 2024

If this is how you want to keep it, then we could configure a release pipeline that, upon a merge to the default branch:

gets the Playwright version from playwright-ct-web/package.json, e.g. 1.49.0
checks the latest version of @sand4rt/experimental-ct-web from npmjs.jcom using something like npm show @sand4rt/experimental-ct-web version
if the Playwright version is higher than the latest module version published to npmjs.com, the pipeline would set the version field of playwright-ct-web/package.json to match the Playwright version, commit the code and perform a release (using gh release create CLI)
if the Playwright version is the same as the latest module version, there's no release

Thanks a lot, i think this would be great to have in place! Lets see how things workout and adjust if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants