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

Automated Pre-release builds #635

Merged
merged 95 commits into from
Jun 21, 2024
Merged

Automated Pre-release builds #635

merged 95 commits into from
Jun 21, 2024

Conversation

josephjclark
Copy link
Collaborator

@josephjclark josephjclark commented Jun 20, 2024

Overview

This PR enables adaptor release candidates to be published to npm with the @next tag and a pre-release version number.

This in turn allows us to test adaptors in Lightning and the CLI without having to release to the public.

Support added to CLI and Worker in: OpenFn/kit#716

Note that this PR supercedes #625

Issue

Closes #585

How it works

The process is basically entirely automated, and every PR will now auto-deploy pre-release builds.

  • Create, commit and push a changeset on a feature branch
  • Any open, non-draft pull request with changesets will automatically build a pre-release candidate on push
  • The version number will be of the form <next-version-number>-next-<commit-sha>, where next-version-number is the number generated by pnpm changeset version
  • Builds will be published to npm with the @next tag
  • The previous build, if any, will be deprecated
  • Repeat on push
  • When the actual release is published with @latest, the last @next is deprecated

Strategy

changesets has support for pre-releases - but I'm not a fan (see #625 (comment)).

Instead, I've set up a customised pre-release process. See the prerelease.mjs file to see how it works - it's quite readable.

Test Adaptor

Check out our test adaptor on npm

image

  • The @latest version is 1.0.1
  • The @next version is 2.0.0-next-1b37034b
  • The previous @next version, deprecated, is 2.0.0-42e3ac8f (the version naming has changed since)

TODO

  • Only trigger a pre-release on non-draft PRs
  • Maybe use a label or something to control this? idk,I think non-draft PRs is fine
  • check errors on deprecate?
  • Make sure the readme is up to date
  • Disable automation, then raise a PR to re-enable automation, then merge

@josephjclark josephjclark changed the base branch from main to next-tags June 20, 2024 13:35
@josephjclark
Copy link
Collaborator Author

This is working so much better!

@josephjclark josephjclark changed the base branch from next-tags to main June 20, 2024 15:28
@josephjclark josephjclark changed the title Adaptor pre-releases v2: better automation Automated Pre-release builds Jun 20, 2024
@josephjclark josephjclark merged commit 4bbe6df into main Jun 21, 2024
1 check passed
@josephjclark josephjclark deleted the next-tags-automated branch June 21, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically deploy pre versions of adaptors
2 participants